• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

상세페이지 api

22.11.08 12:29 작성 조회수 194

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.

 

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

감사합니다.

답변 1

답변을 작성해보세요.

0

hheo97님의 프로필

hheo97

질문자

2022.11.12

 

API를 바꿔해결 했습니다.

그런데

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

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

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

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