cookiecutter-django/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile
HP Bruna 03e5670c25
CSRF in header
CSRF header is needed for a POST request in the Django REST framework.
2018-11-07 21:54:52 +01:00

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
}