Skip to content

Commit 9f8c82a

Browse files
committed
#128 accept header is a space separated array
1 parent 6f2c983 commit 9f8c82a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/dniel/forwardauth/infrastructure/spring/AuthorizeController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class AuthorizeController(val authorizeHandler: AuthorizeHandler) {
6161
it is AuthorizeHandler.AuthEvent.NeedRedirectEvent
6262
} as AuthorizeHandler.AuthEvent.NeedRedirectEvent?
6363
if (redirectEvent != null) {
64-
if ((acceptContent != null && acceptContent == "application/json") ||
64+
if ((acceptContent != null && acceptContent.contains("application/json")) ||
6565
requestedWithHeader != null && requestedWithHeader == "XMLHttpRequest") {
6666
return ResponseEntity.status(HttpStatus.FORBIDDEN).build()
6767
} else {

0 commit comments

Comments
 (0)