will this work?
This commit is contained in:
parent
e2816c34aa
commit
4905c2061b
1 changed files with 16 additions and 0 deletions
|
|
@ -23,6 +23,22 @@
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
proxyPass = "http://127.0.0.1:9111";
|
proxyPass = "http://127.0.0.1:9111";
|
||||||
|
extraConfig = ''
|
||||||
|
auth_request /oauth2/auth;
|
||||||
|
error_page 401 = @error401;
|
||||||
|
|
||||||
|
location = /oauth2/auth {
|
||||||
|
internal;
|
||||||
|
proxy_pass https://sso-proxy.joshuabell.xyz/oauth2/auth;
|
||||||
|
proxy_set_header Host sso-proxy.joshuabell.xyz;
|
||||||
|
proxy_set_header X-Auth-Request-Redirect $request_uri;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @error401 {
|
||||||
|
return 302 https://sso-proxy.joshuabell.xyz/oauth2/start?rd=https://$host$request_uri;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue