Skip to content

Commit

Permalink
更新 WebConfig.java
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamAgo authored and gitee-org committed Aug 13, 2019
1 parent ebf7986 commit 3c2ce02
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main/java/net/mingsoft/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;

import org.springframework.aop.Advisor;
import net.mingsoft.basic.filter.XSSEscapeFilter;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.support.JdkRegexpMethodPointcut;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
Expand Down Expand Up @@ -131,18 +132,17 @@ public Advisor druidStatAdvisor() {
return new DefaultPointcutAdvisor(druidStatPointcut(), druidStatInterceptor());
}

// /**
// * xssFilter注册
// */
// @Bean
// public FilterRegistrationBean xssFilterRegistration() {
// XssFilter xssFilter = new XssFilter();
// xssFilter.setUrlExclusion(Arrays.asList("/static/"));
// FilterRegistrationBean registration = new
// FilterRegistrationBean(xssFilter);
// registration.addUrlPatterns("/*");
// return registration;
// }
/**
* xssFilter注册
*/
@Bean
public FilterRegistrationBean xssFilterRegistration() {
XSSEscapeFilter xssFilter = new XSSEscapeFilter();
FilterRegistrationBean registration = new
FilterRegistrationBean(xssFilter);
registration.addUrlPatterns("/*");
return registration;
}

/**
* RequestContextListener注册
Expand Down

0 comments on commit 3c2ce02

Please sign in to comment.