Compare commits
2 Commits
v2024.6.5-
...
v2024.6.24
Author | SHA1 | Date | |
---|---|---|---|
1009eb19aa | |||
19fda6aa64 |
@ -70,6 +70,7 @@ MAIN:
|
||||
|
||||
r.URL.Host = toURL.Host
|
||||
r.URL.Scheme = toURL.Scheme
|
||||
r.URL.Path = toURL.JoinPath(r.URL.Path).Path
|
||||
|
||||
ctx = logger.With(ctx,
|
||||
logger.F("proxy", match.Name),
|
||||
@ -77,6 +78,11 @@ MAIN:
|
||||
logger.F("remoteAddr", r.RemoteAddr),
|
||||
)
|
||||
|
||||
logger.Debug(
|
||||
ctx, "rewritten url",
|
||||
logger.F("rewrittenURL", r.URL.String()),
|
||||
)
|
||||
|
||||
metricProxyRequestsTotal.With(prometheus.Labels{metricLabelProxy: string(match.Name)}).Add(1)
|
||||
|
||||
ctx = withProxy(ctx, match)
|
||||
|
@ -401,8 +401,14 @@ func (a *Authenticator) getClient(options *LayerOptions, redirectURL string) (*C
|
||||
return client, nil
|
||||
}
|
||||
|
||||
const defaultCookieNamePrefix = "_bouncer_authn_oidc"
|
||||
|
||||
func (a *Authenticator) getCookieName(cookieName string, proxyName store.ProxyName, layerName store.LayerName) string {
|
||||
return strings.ToLower(fmt.Sprintf("%s_%s_%s", cookieName, proxyName, layerName))
|
||||
if cookieName != "" {
|
||||
return cookieName
|
||||
}
|
||||
|
||||
return strings.ToLower(fmt.Sprintf("%s_%s_%s", defaultCookieNamePrefix, proxyName, layerName))
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -8,8 +8,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const defaultCookieName = "_bouncer_authn_oidc"
|
||||
|
||||
type LayerOptions struct {
|
||||
authn.LayerOptions
|
||||
OIDC OIDCOptions `mapstructure:"oidc"`
|
||||
@ -57,7 +55,7 @@ func fromStoreOptions(storeOptions store.LayerOptions) (*LayerOptions, error) {
|
||||
Scopes: []string{"openid"},
|
||||
},
|
||||
Cookie: CookieOptions{
|
||||
Name: defaultCookieName,
|
||||
Name: "",
|
||||
Path: "/",
|
||||
HTTPOnly: true,
|
||||
MaxAge: time.Hour,
|
||||
|
Reference in New Issue
Block a user