Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
7b94ae3a
Commit
7b94ae3a
authored
May 23, 2021
by
RuoYi
Browse files
xss校验json条件优化
parent
bd1edc6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
View file @
7b94ae3a
...
...
@@ -99,6 +99,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
public
boolean
isJsonRequest
()
{
String
header
=
super
.
getHeader
(
HttpHeaders
.
CONTENT_TYPE
);
return
MediaType
.
APPLICATION_JSON_VALUE
.
equalsIgnoreCase
(
header
);
return
StringUtils
.
startsWithIgnoreCase
(
header
,
MediaType
.
APPLICATION_JSON_VALUE
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment