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: entryPoints:
web: web:
address: ":80" 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: forwardedHeaders:
trustedIPs: trustedIPs:
- "127.0.0.1/32" - "127.0.0.1/32"
@ -20,13 +27,23 @@ entryPoints:
trustedIPs: trustedIPs:
- "127.0.0.1/32" - "127.0.0.1/32"
- "10.52.150.20/32" # Jouw NAS IP - "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: providers:
docker: docker:
endpoint: "unix:///var/run/docker.sock" endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false exposedByDefault: false
network: proxy network: proxy
# DE REGEL 'apiVersion' IS HIER WEGGEHAALD!
# Hiermee kun je externe hosts (zoals je NAS zelf) koppelen via bestanden in /rules # Hiermee kun je externe hosts (zoals je NAS zelf) koppelen via bestanden in /rules
file: file: