Commit Graph

16 Commits

Author SHA1 Message Date
Pascal 1d6721f7ba
fix: WebSocket proxy to respect PassHostHeader setting (#3290)
* Fix WebSocket proxy to respect PassHostHeader setting

When PassHostHeader is set to false, the regular HTTP proxy correctly
sets the Host header to the upstream backend URL. However, the WebSocket
proxy was not respecting this setting, causing WebSocket connections to
fail when backend services validate the Host header.

This commit:
- Adds passHostHeader parameter to newWebSocketReverseProxy()
- Applies setProxyUpstreamHostHeader() when PassHostHeader=false
- Ensures consistent behavior between HTTP and WebSocket proxies

Fixes #3288

Signed-off-by: Pascal Schmiel <pascal.schmiel@gmail.com>

* chore(): add tests, update changelog

Signed-off-by: Pascal Schmiel <pascal.schmiel@gmail.com>

---------

Signed-off-by: Pascal Schmiel <pascal.schmiel@gmail.com>
2026-01-16 20:30:16 +01:00
Jan Larwig 0eec65e230
refactor: ptr.Ptr to ptr.To
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-11-16 22:38:59 +01:00
Jan Larwig 9d70e04262
feat: migrate all alpha config booleans to pointers
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-11-16 22:38:49 +01:00
tuunit 7c20001045
introduce mapstructure decoder for yaml parsing
remove color output in tests for better readability in github actions

bugfix: remove google as default provider for alpha options

fix conversion flow for toml to yaml

revert ginkgo color deactivation

revert claim- and secret source back to pointers

regenerate alpha config

Signed-off-by: Jan Larwig <jan@larwig.com>
2025-11-16 22:37:37 +01:00
jet f18a0b7b07
feat: allow disable-keep-alives configuration in upstream (#3156)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-08-19 07:56:16 +02:00
Koen van Zuijlen 343bd61ebb
chore(deps): Updated to ginkgo v2 (#2459)
* chore(deps): Updated to ginkgo v2

* fix basic auth test suite cleanup

* fix redis store tests

* add changelog entry

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-07-18 22:41:02 +02:00
Damien Degois 70571d96e1
Add support for unix socket as upstream (#1866)
* Add support for unix socket as upstream

* Add CHANGELOG.md entry

* Add Unix socket documentation

* Don't export unixRoundTripper, switch from string prefix to Scheme match

* Add basic unix server mock

* Add some tests and comments
2023-10-26 10:57:00 +01:00
Jack Henschel 7a27cb04df Implement configurable timeout for upstream connections
Signed-off-by: Jack Henschel <jack.henschel@cern.ch>
2022-05-18 11:41:17 +01:00
Joel Speed 92ae5d9d24
Remove duplication in proxy directors 2021-03-22 13:07:41 +00:00
Joel Speed 025ef3eca4
Fix upstream proxy appending `?` to requests 2021-03-22 13:07:36 +00:00
Nick Meves c1267bb92d
Request ID Logging (#1087)
* Add RequestID to the RequestScope

* Expose RequestID to auth & request loggers

* Use the RequestID in templated HTML pages

* Allow customizing the RequestID header

* Document new Request ID support

* Add more cases to scope/requestID tests

* Split Get vs Generate RequestID funtionality

* Add {{.RequestID}} to the request logger tests

* Move RequestID management to RequestScope

* Use HTML escape instead of sanitization for Request ID rendering
2021-03-21 18:20:57 +00:00
Nick Meves 602dac7852
Move Logging to Middleware Package (#1070)
* Use a specialized ResponseWriter in middleware

* Track User & Upstream in RequestScope

* Wrap responses in our custom ResponseWriter

* Add tests for logging middleware

* Inject upstream metadata into request scope

* Use custom ResponseWriter only in logging middleware

* Assume RequestScope is never nil
2021-03-06 17:27:16 +00:00
Joel Speed b6d6f31ac1
Introduce Duration so that marshalling works for duration strings 2020-11-19 10:35:29 +00:00
Mitsuo Heijo 3fa42edb73
Fix import path for v7 (#800)
* fix import path for v7

find ./ -name "*.go" | xargs sed -i -e 's|"github.com/oauth2-proxy/oauth2-proxy|"github.com/oauth2-proxy/oauth2-proxy/v7|'

* fix module path

* go mod tidy

* fix installation docs

* update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-09-29 17:44:42 +01:00
Joel Speed d43b372ca9
Use bool pointers for upstream options that default to true 2020-07-19 14:01:36 +01:00
Joel Speed 5b95ed3033
Add tests for upstream package 2020-07-05 10:21:05 +01:00