mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
[MISC] Debug message shows used headers instead of fallback warning. (#772)
This enhancement clarifies the log message following discussions, closes #691.
This commit is contained in:
parent
c75c61f94a
commit
2b4bb3bb05
|
@ -34,10 +34,8 @@ func getOriginalURL(ctx *middlewares.AutheliaCtx) (*url.URL, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("Unable to parse URL extracted from X-Original-URL header: %v", err)
|
||||
}
|
||||
ctx.Logger.Debug("Using X-Original-URL header content as targeted site URL")
|
||||
return url, nil
|
||||
} else {
|
||||
ctx.Logger.Debug("No X-Original-URL header detected, fallback to combination of " +
|
||||
"X-Fowarded-Proto, X-Forwarded-Host and X-Forwarded-URI headers")
|
||||
}
|
||||
|
||||
forwardedProto := ctx.XForwardedProto()
|
||||
|
@ -61,6 +59,8 @@ func getOriginalURL(ctx *middlewares.AutheliaCtx) (*url.URL, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("Unable to parse URL %s: %v", requestURI, err)
|
||||
}
|
||||
ctx.Logger.Debugf("Using X-Fowarded-Proto, X-Forwarded-Host and X-Forwarded-URI headers " +
|
||||
"to construct targeted site URL")
|
||||
return url, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user