swsnu / swpp2021-team6

⛳️ Woondongjang
0 stars 5 forks source link

frontend/hotfix/csrf-token #157

Closed silvermanseoul closed 2 years ago

silvermanseoul commented 2 years ago

Cross-site 쿠키 허용하려고 axios 글로벌 설정을 withCredentials = true로 바꿨어. (Django는 #155 에서 CORS_ALLOW_CREDENTIALS = True로 설정했었어.)

그런데 카카오 API 호출할 땐 예외적으로 false로 했어. true면 preflight 요청에 대한 응답 헤더가 Access-Control-Allow-Origin: *라서 CORS 정책 위반이야.

Screen Shot 2021-12-13 at 5 05 06 PM Screen Shot 2021-12-13 at 5 08 08 PM