fix: remove non-existent sec-headers middleware causing 404

The sec-headers@file middleware was referenced but not defined,
causing Traefik to return 404 for all routes.

- Changed sec-headers@file to default-security-headers@file in both
  docker-compose.prod.yml and docker-compose.traefik.yml
- This assumes the external Traefik has default-security-headers defined
  in its file provider configuration (e.g., in dynamic/middlewares.yml)

If you don't have this middleware defined, either:
1. Define it in your Traefik dynamic configuration, or
2. Remove the middleware label entirely
This commit is contained in:
2026-05-16 13:08:46 +00:00
parent 75108afe29
commit be2cb09dad
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ services:
- traefik.http.routers.headquarter-api.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}
- traefik.http.routers.headquarter-api.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-letsencrypt}
- traefik.http.services.headquarter-api.loadbalancer.server.port=8000
- traefik.http.routers.headquarter-api.middlewares=sec-headers@file
- traefik.http.routers.headquarter-api.middlewares=default-security-headers@file
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\""]
@@ -57,7 +57,7 @@ services:
- traefik.http.routers.headquarter-web.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}
- traefik.http.routers.headquarter-web.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-letsencrypt}
- traefik.http.services.headquarter-web.loadbalancer.server.port=8080
- traefik.http.routers.headquarter-web.middlewares=sec-headers@file
- traefik.http.routers.headquarter-web.middlewares=default-security-headers@file
restart: unless-stopped
db: