-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Possible typo in source code for static upstreams #2622
Labels
Comments
Oh I just realized the static:// URI format is used for status codes, and not files. I'm still not entirely sure why web sockets would be proxied for HTTP status codes. |
This also makes me think that setting it to oauth2-proxy/pkg/validation/upstreams.go Line 79 in fc701bf
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OAuth2-Proxy Version
v7.6.0
Provider
None
Expected Behaviour
As far as I am aware, there is no reason that static URIs should host web socket connections.
According to this line, if
Upstream.ProxyWebSockets
is set tonil
, it should use the default behavior (notfalse
), which is to proxy any web socket connections to that Upstreamoauth2-proxy/pkg/upstream/http.go
Line 56 in fc701bf
Current Behaviour
However according to the source code, when using a "static" URI upstream, it uses sets ProxyWebSockets to
nil
instead offalse
, which means that it will proxy web socket connections to the static file (which doesn't make sense):oauth2-proxy/pkg/apis/options/legacy_options.go
Lines 157 to 178 in fc701bf
Steps To Reproduce
I discovered this while reviewing source code. I don't quite yet have a way to test if this is genuinely an issue.
Possible Solutions
Set
Upstream.ProxyWebSockets
tofalse
instead ofnil
forstatic
URIsConfiguration details or additional information
No response
The text was updated successfully, but these errors were encountered: