37 lines
881 B
YAML
37 lines
881 B
YAML
# This file contains services for security and authorization
|
|
|
|
http:
|
|
services:
|
|
http-catchall:
|
|
# A dummy service for the http-catchall rule
|
|
loadBalancer:
|
|
servers:
|
|
- url: http://dummy-url
|
|
|
|
routers:
|
|
http-catchall:
|
|
# Catch all requests to the http entrypoint and redirect them to https
|
|
service: http-catchall
|
|
rule: hostregexp(`{host:.+}`)
|
|
entrypoint: web
|
|
middlewares:
|
|
- redir
|
|
|
|
middlewares:
|
|
redir:
|
|
# Redirect to https
|
|
redirectScheme:
|
|
scheme: https
|
|
permanent: true
|
|
|
|
auth:
|
|
# Go through authelia for authorization
|
|
forwardAuth:
|
|
address: http://authelia:9091/api/verify?rd=https://auth.{{ env "PRIVATE_DOMAIN" }}/
|
|
trustForwardHeader: true
|
|
authResponseHeaders:
|
|
- X-Forwarded-User
|
|
tls:
|
|
insecureSkipVerify: true
|
|
|