Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shawnhank/04004aeb71d5fd7380aaab4610c5e7ee to your computer and use it in GitHub Desktop.
Save shawnhank/04004aeb71d5fd7380aaab4610c5e7ee to your computer and use it in GitHub Desktop.
http:
routers:
pihole:
entryPoints:
- "https"
rule: "Host(`pihole.example.com`)"
middlewares:
- default-headers
- addprefix-pihole
tls:
certResolver: http
service: pihole
services:
pihole:
loadBalancer:
servers:
- url: "http://192.168.0.10:80"
passHostHeader: true
middlewares:
addprefix-pihole:
addPrefix:
prefix: "/admin"
https-redirect:
redirectScheme:
scheme: https
default-headers:
headers:
frameDeny: true
sslRedirect: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
default-whitelist:
ipWhiteList:
sourceRange:
- "10.0.0.0/24"
- "192.168.0.0/16"
- "172.0.0.0/8"
secured:
chain:
middlewares:
- default-whitelist
- default-headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment