2024. 5. 1. 11:11
2024. 4. 30. 16:20
템플릿 태크 {% csrf_token %}는 다음과 같이 렌더링되는
숨겨진 필드를 생성
<input type="hidden" name="csrfmiddlewaretoken" value="26jk2cEtV9z4JIEHXal/>
CSRF의 자세한 내용은 다음을 참고한다
https://owasp.org/www-community/attacks/csrf
2024. 4. 26. 17:52
1. pip install django-cors-headers
2. settings.py
INSTALLED_APPS = [
'corsheaders'
]
3. MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
]
4. CORS_ALLOWED_ORIGINS = [
'http://localhost:5173' # 보내는 클라이언트 주소
]
5. CORS_ALLOW_CREDENTIALS = True
2024. 4. 26. 14:18
pip install djangorestframework
pip install djangorestframework-simplejwt
2024. 4. 26. 14:16