Traefik headers hostsProxyHeaders meaning

1.4k Views Asked by At

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?

0

There are 0 best solutions below