1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-07-07 01:17:14 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
cb53401c3a Don't use http.StripPrefix when a file: upstream has rewriteTarget
A regular (non-regex) file: upstream needs to strip the prefix so that it is equivalent to "mounting" the specified directory under the configured path in the URL space, but with regex rewriting the target path is determined by the rewriteTarget.

Fixes oauth2-proxy/oauth2-proxy#2242
2024-09-02 11:27:28 +01:00
f8efdbae5f chore: Updated go-jwt to v5 2024-03-04 01:42:00 +01:00
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
88f32aeaa1 rename Upstreams to UpstreamConfig and its Configs member to Upstreams then 2021-09-17 12:37:57 +00:00
d51556515e Introduce ProxyRawPath flag
Setting this flag will configure the upstream proxy to pass encoded urls
as-is.
2021-09-17 12:37:56 +00:00
12ab4ef529 Make the Upstreams mux configurable
This commit changes Upstreams from []Upstream to a struct{}
moving the previous []Upstream into .Configs and adjusts all uses of it.
2021-09-17 12:31:18 +00:00
075cb9c3a0 Ensure upstreams are sorted by longest first 2021-06-23 12:20:48 +01:00
8a06779d41 Redirect request if it would match with an appended trailing slash 2021-06-23 12:20:47 +01:00
6c62b25bf1 Allow request paths to be rewritten before proxying to upstream server 2021-06-23 12:20:46 +01:00
d2d62bb452 Replace standard serve mux with gorilla mux 2021-06-23 12:20:21 +01:00
befcdd9d04 Add pagewriter to upstream proxy 2021-05-10 11:14:05 +01:00
a63ed0225c Use ErrorPage to render proxy error page 2021-02-12 21:12:27 +00:00
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
b40517bbe3 Fix conversion of static responses in upstreams 2020-08-31 16:54:01 +01:00
d69fd6af22 Allow Logging to stdout with separate Error Log Channel (#718)
* Add dedicated error logging writer

* Document new errors to stdout flag

* Update changelog

* Thread-safe the log buffer

* Address feedback

* Remove duplication by adding log level

* Clean up error formatting

* Apply suggestions from code review

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-08-10 11:44:08 +01:00
65c228394f Address gosec findings
Mostly handling unhandled errors appropriately.
If logging to STDERR fails, we panic. Added #nosec
comments to findings we are OK with.
2020-08-09 07:55:39 -07:00
e1c3e938cc Add upstream package with Proxy server implementation 2020-07-05 10:21:05 +01:00