HTTPS인 내 페이지와 HTTP인 API 주소

movie·2022년 6월 9일
0

react app을 gh-pages 등으로 배포하면 https로 배포가 된다.
만약 API url이 http라면
mixed content라 통신이 안된다.

이를 해결하기 위해서는
heroku로 배포하면 된다!-> http, https 둘 다 가능

// 처음에만
heroku login
heroku create <project-name>
heroku create <project-name>-heroku --buildpack https://github.com/mars/create-react-app-buildpack.git


git add .
git commit -m "deploy"
git push heroku <branch-name>:main

출처

  • 마르코
profile
영화보관소는 영화관 😎

0개의 댓글