git.iko.soy/typeable/oauth2-proxy
on master help sign in
docs: add statusRewrites to Traefik Errors middleware example (#3360)
c6355eeNick Nikolakakis
docs/docs/configuration/integrations/traefik.md+8
@@ -79,8 +79,16 @@ http:
79 - "401-403"
79 - "401-403"
80 service: oauth-backend
80 service: oauth-backend
81 query: "/oauth2/sign_in?rd={url}"
81 query: "/oauth2/sign_in?rd={url}"
82+ statusRewrites:
83+ "401": 302
82```
84```
83
85
86+:::caution Troubleshooting: Browser shows "Found." instead of redirecting
87+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
88+
89+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
90+:::
91+
84### ForwardAuth with static upstreams configuration
92### ForwardAuth with static upstreams configuration
85
93
86Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
94Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
docs/versioned_docs/version-7.10.x/configuration/integration.md+8
@@ -225,8 +225,16 @@ http:
225 - "401-403"
225 - "401-403"
226 service: oauth-backend
226 service: oauth-backend
227 query: "/oauth2/sign_in?rd={url}"
227 query: "/oauth2/sign_in?rd={url}"
228+ statusRewrites:
229+ "401": 302
228```
230```
229
231
232+:::info Troubleshooting: Browser shows "Found." instead of redirecting
233+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
234+
235+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
236+:::
237+
230### ForwardAuth with static upstreams configuration
238### ForwardAuth with static upstreams configuration
231
239
232Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
240Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
docs/versioned_docs/version-7.11.x/configuration/integration.md+8
@@ -225,8 +225,16 @@ http:
225 - "401-403"
225 - "401-403"
226 service: oauth-backend
226 service: oauth-backend
227 query: "/oauth2/sign_in?rd={url}"
227 query: "/oauth2/sign_in?rd={url}"
228+ statusRewrites:
229+ "401": 302
228```
230```
229
231
232+:::info Troubleshooting: Browser shows "Found." instead of redirecting
233+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
234+
235+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
236+:::
237+
230### ForwardAuth with static upstreams configuration
238### ForwardAuth with static upstreams configuration
231
239
232Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
240Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
docs/versioned_docs/version-7.12.x/configuration/integration.md+8
@@ -225,8 +225,16 @@ http:
225 - "401-403"
225 - "401-403"
226 service: oauth-backend
226 service: oauth-backend
227 query: "/oauth2/sign_in?rd={url}"
227 query: "/oauth2/sign_in?rd={url}"
228+ statusRewrites:
229+ "401": 302
228```
230```
229
231
232+:::info Troubleshooting: Browser shows "Found." instead of redirecting
233+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
234+
235+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
236+:::
237+
230### ForwardAuth with static upstreams configuration
238### ForwardAuth with static upstreams configuration
231
239
232Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
240Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
docs/versioned_docs/version-7.13.x/configuration/integrations/traefik.md+8
@@ -79,8 +79,16 @@ http:
79 - "401-403"
79 - "401-403"
80 service: oauth-backend
80 service: oauth-backend
81 query: "/oauth2/sign_in?rd={url}"
81 query: "/oauth2/sign_in?rd={url}"
82+ statusRewrites:
83+ "401": 302
82```
84```
83
85
86+:::info Troubleshooting: Browser shows "Found." instead of redirecting
87+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
88+
89+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
90+:::
91+
84### ForwardAuth with static upstreams configuration
92### ForwardAuth with static upstreams configuration
85
93
86Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
94Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
docs/versioned_docs/version-7.14.x/configuration/integrations/traefik.md+8
@@ -79,8 +79,16 @@ http:
79 - "401-403"
79 - "401-403"
80 service: oauth-backend
80 service: oauth-backend
81 query: "/oauth2/sign_in?rd={url}"
81 query: "/oauth2/sign_in?rd={url}"
82+ statusRewrites:
83+ "401": 302
82```
84```
83
85
86+:::info Troubleshooting: Browser shows "Found." instead of redirecting
87+When using the Errors middleware without `statusRewrites`, the redirect response from oauth2-proxy can be served within the original 401/403 status context. This causes some browsers to display a "Found." link instead of automatically following the redirect to the identity provider.
88+
89+Adding `statusRewrites` to rewrite `401 -> 302` ensures the browser treats the response as a proper redirect and follows it automatically.
90+:::
91+
84### ForwardAuth with static upstreams configuration
92### ForwardAuth with static upstreams configuration
85
93
86Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
94Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint