fix(handlers): align response status codes for the verify endpoint (#2016)
This aligns all response status codes on the /api/verify endpoint when an error occurs, making it impossible to determine the actual reason for the failure.pull/2015/head^2
parent
a56cffa129
commit
c62dbd43d6
|
@ -428,7 +428,9 @@ func VerifyGet(cfg schema.AuthenticationBackendConfiguration) middlewares.Reques
|
||||||
targetURL, err := ctx.GetOriginalURL()
|
targetURL, err := ctx.GetOriginalURL()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Error(fmt.Errorf("Unable to parse target URL: %s", err), operationFailedMessage)
|
ctx.Logger.Error(fmt.Errorf("Unable to parse target URL: %s", err))
|
||||||
|
ctx.ReplyUnauthorized()
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue