Files
homelab/k8s/infra/ingresses/templates/middleware-common.yaml
T
2023-03-27 21:36:33 +00:00

42 lines
1004 B
YAML

---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: https-redirect
namespace: "{{ .Release.Namespace }}"
spec:
redirectScheme:
scheme: https
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strict-transport
namespace: "{{ .Release.Namespace }}"
spec:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"
stsSeconds: 15552000
stsIncludeSubdomains: true
stsPreload: true
forceSTSHeader: true
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: forwardauth-authelia
namespace: "{{ .Release.Namespace }}"
labels:
app.kubernetes.io/instance: authelia
app.kubernetes.io/name: authelia
spec:
forwardAuth:
address: http://main-authelia.authellia.svc.cluster.local/api/verify?rd=https%3A%2F%2Fauth.core.{{.Values.global.domain}}%2F
authResponseHeaders:
- Remote-User
- Remote-Name
- Remote-Email
- Remote-Groups