Skip to content

Commit

Permalink
#128 accept header is a space separated array
Browse files Browse the repository at this point in the history
  • Loading branch information
dniel committed Sep 25, 2019
1 parent 6f2c983 commit 9f8c82a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class AuthorizeController(val authorizeHandler: AuthorizeHandler) {
it is AuthorizeHandler.AuthEvent.NeedRedirectEvent
} as AuthorizeHandler.AuthEvent.NeedRedirectEvent?
if (redirectEvent != null) {
if ((acceptContent != null && acceptContent == "application/json") ||
if ((acceptContent != null && acceptContent.contains("application/json")) ||
requestedWithHeader != null && requestedWithHeader == "XMLHttpRequest") {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build()
} else {
Expand Down

0 comments on commit 9f8c82a

Please sign in to comment.