fix: redirect plain-http desfoto.de to HTTPS with an own router

The running Traefik instance has no global entrypoint http->https
redirection even though /srv/stack/docker-compose.yml declares one, so
plain http://desfoto.de/ answered with Traefik's default 404 once the old
desfoto-redirect-http router was removed. Route desfoto.de through its own
http router (desfoto-http + desfoto-http-to-https, permanent redirect) via
the proven live Docker provider instead of restarting the shared proxy.
Document the live-config drift in docs/deployment.md.
This commit is contained in:
opencode
2026-09-19 16:04:32 +02:00
parent f69a00c773
commit 2ccb39a69b
2 changed files with 43 additions and 6 deletions

View File

@@ -21,9 +21,20 @@ services:
traefik.http.routers.desfoto-www.middlewares: desfoto-canonical
traefik.http.routers.desfoto-www.service: desfoto
# HTTP is already redirected to HTTPS by the global Traefik entrypoint
# redirection (see /srv/stack/docker-compose.yml); the ACME http-challenge
# is answered by Traefik itself before the redirect.
# HTTP -> HTTPS. The shared Traefik instance is running WITHOUT the
# global entrypoint redirection that /srv/stack/docker-compose.yml
# declares (live-config drift, documented in docs/deployment.md), so
# desfoto.de carries its own http router instead of relying on the
# proxy's global configuration. If that global redirect is ever enabled,
# this router simply becomes unreachable. The ACME http-challenge is
# answered by Traefik's internal acme-http router (maximum priority)
# before this redirect can apply.
traefik.http.routers.desfoto-http.rule: Host(`desfoto.de`) || Host(`www.desfoto.de`)
traefik.http.routers.desfoto-http.entrypoints: http
traefik.http.routers.desfoto-http.middlewares: desfoto-http-to-https
traefik.http.routers.desfoto-http.service: noop@internal
traefik.http.middlewares.desfoto-http-to-https.redirectscheme.scheme: https
traefik.http.middlewares.desfoto-http-to-https.redirectscheme.permanent: 'true'
traefik.http.middlewares.desfoto-canonical.redirectregex.regex: ^https?://(?:www\.)?desfoto\.de/(.*)
traefik.http.middlewares.desfoto-canonical.redirectregex.replacement: https://desfoto.de/$${1}
traefik.http.middlewares.desfoto-canonical.redirectregex.permanent: 'true'