You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-06-19 22:58:30 +02:00
Co-authored-by: Sven Ertel <sven.ertel@bayernwerk.de>
This commit is contained in:
@@ -20,7 +20,7 @@ server {
|
|||||||
|
|
||||||
# If the auth_request denies the request (401), redirect to the sign_in page
|
# If the auth_request denies the request (401), redirect to the sign_in page
|
||||||
# and include the final rd URL back to the user's original request.
|
# and include the final rd URL back to the user's original request.
|
||||||
error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
||||||
|
|
||||||
# Alternatively send the request to `start` to skip the provider button
|
# Alternatively send the request to `start` to skip the provider button
|
||||||
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
||||||
@@ -54,7 +54,7 @@ server {
|
|||||||
|
|
||||||
# If the auth_request denies the request (401), redirect to the sign_in page
|
# If the auth_request denies the request (401), redirect to the sign_in page
|
||||||
# and include the final rd URL back to the user's original request.
|
# and include the final rd URL back to the user's original request.
|
||||||
error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
||||||
|
|
||||||
# Alternatively send the request to `start` to skip the provider button
|
# Alternatively send the request to `start` to skip the provider button
|
||||||
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ server {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
auth_request /oauth2/auth;
|
auth_request /oauth2/auth;
|
||||||
error_page 401 = /oauth2/sign_in;
|
error_page 401 =403 /oauth2/sign_in;
|
||||||
|
|
||||||
# pass information via X-User and X-Email headers to backend,
|
# pass information via X-User and X-Email headers to backend,
|
||||||
# requires running with --set-xauthrequest flag
|
# requires running with --set-xauthrequest flag
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ server {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
auth_request /oauth2/auth;
|
auth_request /oauth2/auth;
|
||||||
error_page 401 = /oauth2/sign_in;
|
error_page 401 =403 /oauth2/sign_in;
|
||||||
|
|
||||||
# pass information via X-User and X-Email headers to backend,
|
# pass information via X-User and X-Email headers to backend,
|
||||||
# requires running with --set-xauthrequest flag
|
# requires running with --set-xauthrequest flag
|
||||||
|
|||||||
Reference in New Issue
Block a user