We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb2d413 + e93b31b commit 7761b62Copy full SHA for 7761b62
main.go
@@ -30,6 +30,7 @@ import (
30
31
const (
32
retryInterval = 5 * time.Second
33
+ prefixHeader = "X-Forwarded-Prefix"
34
)
35
36
type config struct {
@@ -234,6 +235,9 @@ func main() {
234
235
request.URL.Host = cfg.url.Host
236
// Derive path from the paths of configured URL and request URL.
237
request.URL.Path, request.URL.RawPath = joinURLPath(cfg.url, request.URL)
238
+ // Add prefix header with value "/", since from a client's perspective
239
+ // we are forwarding /<anything> to /<cfg.url.Path>/<anything>.
240
+ request.Header.Add(prefixHeader, "/")
241
},
242
}
243
p.Transport = &oauth2.Transport{
0 commit comments