mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 12:19:24 +08:00
Fix CSRF
This commit is contained in:
parent
12b8ed02fd
commit
43c159cfec
1 changed files with 2 additions and 0 deletions
|
@ -47,8 +47,10 @@ ALLOWED_HOSTS = ['*']
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
CSRF_TRUSTED_ORIGINS = [
|
||||||
# Frontend
|
# Frontend
|
||||||
f'{URL_SCHEME}://{FRONTEND_ADDRESS}:{FRONTEND_PORT}',
|
f'{URL_SCHEME}://{FRONTEND_ADDRESS}:{FRONTEND_PORT}',
|
||||||
|
f'{URL_SCHEME}://{FRONTEND_ADDRESS}', # For external domains
|
||||||
# Backend
|
# Backend
|
||||||
f'{URL_SCHEME}://{BACKEND_ADDRESS}:{BACKEND_PORT}',
|
f'{URL_SCHEME}://{BACKEND_ADDRESS}:{BACKEND_PORT}',
|
||||||
|
f'{URL_SCHEME}://{BACKEND_ADDRESS}' # For external domains
|
||||||
# You can also set up https://*.name.xyz for wildcards here
|
# You can also set up https://*.name.xyz for wildcards here
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue