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
MCMS
Commits
212b6b15
Commit
212b6b15
authored
Aug 30, 2019
by
sgjj
Browse files
xxs
parent
c8be6e2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/config/WebConfig.java
View file @
212b6b15
...
...
@@ -150,16 +150,16 @@ public class WebConfig implements WebMvcConfigurer {
return
new
DefaultPointcutAdvisor
(
druidStatPointcut
(),
druidStatInterceptor
());
}
// /**
// * xssFilter注册
// */
// @Bean
// public FilterRegistrationBean xssFilterRegistration() {
// XSSEscapeFilter xssFilter = new XSSEscapeFilter(
);
// FilterRegistrationBean registration = new FilterRegistrationBean(xssFilter
);
// registration.addUrlPatterns("/*");
//
return registration;
//
}
@Bean
public
FilterRegistrationBean
xssFilterRegistration
()
{
XSSEscapeFilter
xssFilter
=
new
XSSEscapeFilter
();
FilterRegistrationBean
registration
=
new
FilterRegistrationBean
(
xssFilter
);
xssFilter
.
excludes
.
add
(
".*file/upload.do"
);
xssFilter
.
excludes
.
add
(
".*/jsp/editor.do"
);
registration
.
addUrlPatterns
(
"/*"
);
return
registration
;
}
/**
* RequestContextListener注册
...
...
src/main/resources/application.yml
View file @
212b6b15
...
...
@@ -12,7 +12,8 @@ ms:
view-path
:
/WEB-INF/manager
upload
:
path
:
/upload
path
:
/upload
mapping
:
/upload/**
denied
:
.exe,.jsp
allowed
:
jpg
max-size
:
1
...
...
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