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
James Elliott 2021-05-21 22:03:44 +10:00 committed by GitHub
parent a56cffa129
commit c62dbd43d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -428,7 +428,9 @@ func VerifyGet(cfg schema.AuthenticationBackendConfiguration) middlewares.Reques
targetURL, err := ctx.GetOriginalURL()
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
}