mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-16 22:57:05 +03:00
03e5670c25
CSRF header is needed for a POST request in the Django REST framework.
16 lines
392 B
Caddyfile
16 lines
392 B
Caddyfile
www.{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
|
redir https://{% raw %}{$DOMAIN_NAME}{% endraw %}
|
|
}
|
|
|
|
{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
|
proxy / django:5000 {
|
|
header_upstream Host {host}
|
|
header_upstream X-Real-IP {remote}
|
|
header_upstream X-Forwarded-Proto {scheme}
|
|
header_upstream X-CSRFToken {~csrftoken}
|
|
}
|
|
log stdout
|
|
errors stdout
|
|
gzip
|
|
}
|