diff --git a/config/npm-advanced.conf b/config/npm-advanced.conf index eb18a04..45e7474 100644 --- a/config/npm-advanced.conf +++ b/config/npm-advanced.conf @@ -6,6 +6,7 @@ # Requires an Authentik Proxy Provider of type "Forward auth (single # application)" with external host https://stream.hetherman.cloud and an # Application bound to the `stream-viewers` group. +port_in_redirect off; # Forward every incoming request to the Authentik outpost for validation. auth_request /outpost.goauthentik.io/auth/nginx; @@ -24,7 +25,9 @@ auth_request_set $authentik_email $upstream_http_x_authentik_email; location /outpost.goauthentik.io { # All traffic to /outpost.goauthentik.io is proxied to the Authentik host. # Point this at your Authentik outpost URL. - proxy_pass https://auth.hetherman.cloud/outpost.goauthentik.io; + # Use the internal Authentik address directly (HTTP, no TLS) to avoid + # routing back through NPM and the SSL SNI issues that come with it. + proxy_pass http://192.168.50.224:30140/outpost.goauthentik.io; proxy_set_header Host $host; proxy_set_header X-Original-URL $scheme://$http_host$request_uri; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -43,5 +46,5 @@ location /outpost.goauthentik.io { location @goauthentik_proxy_signin { internal; add_header Set-Cookie $auth_cookie; - return 302 /outpost.goauthentik.io/start?rd=$request_uri; + return 302 /outpost.goauthentik.io/start?rd=$scheme://$http_host$request_uri; }