@@ -44,7 +44,29 @@ Index: /etc/rc.d/rc.nginx
4444 T=' '
4545 if check && [[ $1 == lo ]]; then
4646 if [[ $IPV4 == yes ]]; then
47- @@ -400,11 +418,11 @@
47+ @@ -363,10 +381,21 @@
48+ allow all;
49+ try_files /login.php =404;
50+ include fastcgi_params;
51+ }
52+ #
53+ + # SSO endpoints (public)
54+ + location /auth/sso {
55+ + allow all;
56+ + proxy_pass http://unix:/var/run/unraid-core.sock:;
57+ + proxy_http_version 1.1;
58+ + proxy_set_header Host $host;
59+ + proxy_set_header X-Real-IP $remote_addr;
60+ + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
61+ + proxy_set_header X-Forwarded-Proto $scheme;
62+ + }
63+ + #
64+ # Redirect to login page on failed authentication (401)
65+ #
66+ error_page 401 @401;
67+ location @401 {
68+ return 302 $scheme://$http_host/login;
69+ @@ -400,11 +429,11 @@
4870 # my servers proxy
4971 #
5072 location /graphql {
@@ -57,7 +79,7 @@ Index: /etc/rc.d/rc.nginx
5779 proxy_set_header Upgrade $http_upgrade;
5880 proxy_set_header Connection $connection_upgrade;
5981 proxy_cache_bypass $http_upgrade;
60- @@ -566,11 +584 ,11 @@
82+ @@ -566,11 +595 ,11 @@
6183 # extract common name from cert
6284 CERTNAME=$(openssl x509 -noout -subject -nameopt multiline -in $CERTPATH | sed -n 's/ *commonName *= //p')
6385 # define CSP frame-ancestors for cert
@@ -70,7 +92,7 @@ Index: /etc/rc.d/rc.nginx
7092 WANIP6=$(curl https://wanip6.unraid.net/ 2>/dev/null)
7193 fi
7294 if [[ $CERTNAME == *\.myunraid\.net ]]; then
73- @@ -660,14 +678 ,14 @@
95+ @@ -660,14 +689 ,14 @@
7496 echo "NGINX_WANFQDN=\"$WANFQDN\"" >>$INI
7597 echo "NGINX_WANFQDN6=\"$WANFQDN6\"" >>$INI
7698 # defined if ts_bundle.pem present:
0 commit comments