What does Traefik's Headers hostProxyHeaders configuration do?
I am looking at traefik.yml settings from django-cookiecutter (link)
middlewares:
csrf:
# https://docs.traefik.io/master/middlewares/headers/#hostsproxyheaders
# https://docs.djangoproject.com/en/dev/ref/csrf/#ajax
headers:
hostsProxyHeaders: ["X-CSRFToken"]
I understand that it is required for CSRF header which django uses. Why is this configuration required and what happens if this configuration is not set?