Skip to content

Commit

Permalink
fix: 配置规范
Browse files Browse the repository at this point in the history
  • Loading branch information
msgroup authored and MKFFT committed Sep 17, 2022
1 parent 2add41d commit f54fca3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/mingsoft/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ public BeanTypeAutoProxyCreator beanTypeAutoProxyCreator() {

//XSS过滤器
@Bean
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.xssEnable:false}") boolean xssEnable,
@Value("${ms.xss.filterUrl}") String filterUrl,
@Value("${ms.xss.excludeUrl}") String excludeUrl) {
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:false}") boolean xssEnable,
@Value("${ms.xss.filter-url}:''") String filterUrl,
@Value("${ms.xss.exclude-url}:''") String excludeUrl) {
XSSEscapeFilter xssFilter = new XSSEscapeFilter();
Map<String, String> initParameters = new HashMap();
FilterRegistrationBean registration = new FilterRegistrationBean();
Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
server:
port: 8080
servlet.session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
error:
include-exception: true
include-message: always
servlet:
context-path: / #项目名称
session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
encoding:
force: true
charset: utf-8
Expand All @@ -21,9 +22,9 @@ logging:

ms:
xss:
xssEnable: true #xss过滤器的开关
filterUrl: /** #过滤的url,多个用逗号分开
excludeUrl: /static/**,/template/**,/file/upload.do,/static/plugins/ueditor/1.4.3.3/jsp/editor.do #排除的url,多个用逗号分开
enable: true #xss过滤器的开关
filter-url: /** #过滤的url,多个用逗号分开
exclude-url: /static/**,/template/**,/file/upload.do,/static/plugins/ueditor/1.4.3.3/jsp/editor.do #排除的url,多个用逗号分开
# mstore-url: http://store.i.mingsoft.net
# mstore-host: store.i.mingsoft.net
# shiro-key: #16位长度,不填写默认随机生成
Expand Down

0 comments on commit f54fca3

Please sign in to comment.