update traefik configuration to enable HTTP to HTTPS redirection and add wildcard SSL setup

This commit is contained in:
CalvinSteenbergen 2025-11-29 12:21:58 +01:00
parent 583f3367dc
commit 1f5ba37dc0

View file

@ -5,7 +5,14 @@ api:
entryPoints:
web:
address: ":80"
# Trusted IPs config (zodat Authentik straks de juiste IP's ziet via de NAS)
# HTTP naar HTTPS redirect (Nu Traefik de voordeur is, moet dit AAN staan)
http:
redirections:
entryPoint:
to: websecure
scheme: https
# Trusted IPs config
forwardedHeaders:
trustedIPs:
- "127.0.0.1/32"
@ -21,12 +28,22 @@ entryPoints:
- "127.0.0.1/32"
- "10.52.150.20/32" # Jouw NAS IP
# --- WILDCARD SSL CONFIGURATIE ---
# Dit zorgt dat Traefik 1 certificaat haalt voor ALLES (*.stackbabber.nl).
# Dit voorkomt de Cloudflare foutmeldingen.
http:
tls:
certResolver: letsencrypt
domains:
- main: "stackbabber.nl"
sans:
- "*.stackbabber.nl"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: proxy
# DE REGEL 'apiVersion' IS HIER WEGGEHAALD!
# Hiermee kun je externe hosts (zoals je NAS zelf) koppelen via bestanden in /rules
file: