Add (authentik) forward-auth snippet for domain-level SSO
This commit is contained in:
16
Caddyfile
16
Caddyfile
@@ -1,3 +1,19 @@
|
|||||||
|
# Authentik forward-auth snippet (domain-level mode).
|
||||||
|
# Usage: add "import authentik" inside any site block to gate it.
|
||||||
|
(authentik) {
|
||||||
|
route {
|
||||||
|
reverse_proxy /outpost.goauthentik.io/* https://auth.hubris.network {
|
||||||
|
header_up Host {upstream_hostport}
|
||||||
|
}
|
||||||
|
forward_auth https://auth.hubris.network {
|
||||||
|
uri /outpost.goauthentik.io/auth/caddy
|
||||||
|
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
|
||||||
|
trusted_proxies private_ranges
|
||||||
|
header_up Host {upstream_hostport}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# The Caddyfile is an easy way to configure your Caddy web server.
|
# The Caddyfile is an easy way to configure your Caddy web server.
|
||||||
#
|
#
|
||||||
# Unless the file starts with a global options block, the first
|
# Unless the file starts with a global options block, the first
|
||||||
|
|||||||
Reference in New Issue
Block a user