Issue 10014
When running Traefik in a docker swarm, using labels as configuration - Traefik is intercepting a 409
error and returning a 500
error to the user.
The issue is caused by Inertiajs returning a 409 when it wants the session to redirect. I don't know why it does this, I'm sure they had a great reason - but I'm not going to be able to change it.
If I curl
to the nginx server in the container (running Mixpost) I see the 409
and the X-Inertia-Location:
header.
If I make the same request to the Traefik server, it passes the request to the Mixpost container, get's the 409 - but returns a 500
error with a plain body of "Internal Server Error"
I'm not sure how to get Traefik to pass the error through without munging it, leaving the extra headers intact also.
The compose for for Traefik is Compose for Traefik on Swarm (forum post) · GitHub
Labels for Mixpost are:
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.constraint-label=traefik-public
#----------------------------------------------- routers for: odoo --------------------------------------------------
# http
- traefik.http.routers.${APP_SITE}-http.rule=Host(`${APP_DOMAIN}`, `www.${APP_DOMAIN}`)
- traefik.http.routers.${APP_SITE}-http.entrypoints=http
- traefik.http.routers.${APP_SITE}-http.middlewares=servicests
- traefik.http.routers.${APP_SITE}-http.middlewares=https-redirect
- traefik.http.routers.${APP_SITE}-http.service=${APP_SITE}
# https
- traefik.http.routers.${APP_SITE}-https.rule=Host(`${APP_DOMAIN}`, `www.${APP_DOMAIN}`) && PathPrefix(`/`)
- traefik.http.routers.${APP_SITE}-https.entrypoints=http3
- traefik.http.routers.${APP_SITE}-https.service=${APP_SITE}
- traefik.http.routers.${APP_SITE}-https.tls.certresolver=${APP_SITE_RESOLVER}
- traefik.http.routers.${APP_SITE}-https.middlewares=gzip,limit,strip-prefix
#====================================================== services ===========================================================
- traefik.http.services.${APP_SITE}.loadbalancer.server.port=80