Skip to content

Commit c62dbd4

Browse files
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.
1 parent a56cffa commit c62dbd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/handlers/handler_verify.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ func VerifyGet(cfg schema.AuthenticationBackendConfiguration) middlewares.Reques
428428
targetURL, err := ctx.GetOriginalURL()
429429

430430
if err != nil {
431-
ctx.Error(fmt.Errorf("Unable to parse target URL: %s", err), operationFailedMessage)
431+
ctx.Logger.Error(fmt.Errorf("Unable to parse target URL: %s", err))
432+
ctx.ReplyUnauthorized()
433+
432434
return
433435
}
434436

0 commit comments

Comments
 (0)