강의

멘토링

커뮤니티

Inflearn Community Q&A

hheo973520's profile image
hheo973520

asked

(2025 Latest Update) React: The Last Step to Becoming a Front-End Developer

20. Fourth Portfolio Project

상세페이지 api

Written on

·

363

0

 

영화 디테일 정보를 이 api 사용하여 호출하면

https://developers.themoviedb.org/3/movies/get-movie-details

아래와 같은 error가 발생합니다.

Access to fetch at 'https://developers.themoviedb.org/3/movies/get-movie-details/movies/663712' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

 

어느 부분을 수정해야 하는 지 알려주세요

감사합니다.

web-apireduxreact

Answer 1

0

hheo97님의 프로필 이미지
hheo97
Questioner

 

API를 바꿔해결 했습니다.

그런데

 <YouTube
              videoId=${PreTrailerKey}
              opts={opts}
              onReady={onPlayerReady}
            />

videoID 를 동적으로 위와 같이하면

유튜브 실행이 되지 않습니다.

동적 변수 처리 방법을 알려주세요

hheo973520's profile image
hheo973520

asked

Ask a question