CSRF 검증

2023. 12. 6. 10:42project

참고 사이트

Origin checking failed with SSL (https) - Using Django / Forms & APIs - Django Forum (djangoproject.com)

 

Origin checking failed with SSL (https)

Yes you are correct, I have those in my settings.py

forum.djangoproject.com

 

 

문제 화면

debug를 True로 설정하고 로그인 시 위와 같은 오류 페이지 확인

 

 

django 서버에서 setting.py 수정
ALLOWED_HOSTS= ["mysite.com"]
CSRF_TRUSTED_ORIGINS= ["https://mysite.com"]
CSRF_ALLOWED_ORIGINS= ["https://mysite.com"]
CORS_ORIGINS_WHITELIST= ["https://mysite.com"]

'mysite.com'을 자신의 웹사이트 도메인 주소로 대체해서 기입하면 문제 없이 PUT 요청이 가능함을 확인할 수 있다.

'project' 카테고리의 다른 글

S3와 django 연동  (0) 2023.12.07
면접 참고 자료  (0) 2023.12.06
Elasticache Redis  (1) 2023.12.06
오토 스케일링  (2) 2023.12.05
Nginx Gunicorn Django Mysql 연동  (0) 2023.12.03