1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-28 09:08:44 +02:00
oauth2-proxy/pkg
Mariano Vallés a999270cf3
Add req.host to targetURL when redirecting to https (#668)
* Add req.host to targetURL when redirecting to https

The req.URL.Host might not be present when redirecting to https if the
given req.URL is something like "/". In such scenario, the req.Host is
still present and valid.

This commit adds the original req.Host to the targetURL before returning
the 308 status, to avoid having a `Location: https:///` in the response.

* Bring back empty line

* Wrap the setting of targetURL.Host in a condition

* Add a comment to the test explaining why the redirectURL includes example.com

* Add changelog entry
2020-07-07 09:55:38 +01:00
..
apis Add Upstreams options struct with validation 2020-07-05 10:21:05 +01:00
cookies Rename CookieOptions to Cookie 2020-07-05 09:18:21 +01:00
encryption Move Encrypt/Decrypt Into helper to session_state.go 2020-06-12 14:46:35 -07:00
ip Move RealClientIP code to IP packages 2020-05-23 15:17:41 +01:00
logger Implements --real-client-ip-header option. (#503) 2020-05-12 18:41:25 +01:00
middleware Add req.host to targetURL when redirecting to https (#668) 2020-07-07 09:55:38 +01:00
requests Add tests for request result 2020-07-06 20:37:36 +01:00
sessions Rename CookieOptions to Cookie 2020-07-05 09:18:21 +01:00
upstream Add tests for upstream package 2020-07-05 10:21:05 +01:00
util Fix #635: Support specifying alternative provider TLS trust source(s) (#645) 2020-07-03 16:09:17 +01:00
validation Migrate all requests to result pattern 2020-07-06 20:38:00 +01:00