Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
f54fca30
Commit
f54fca30
authored
Sep 17, 2022
by
msgroup
Committed by
zhouyk
Sep 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 配置规范
parent
2add41d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
WebConfig.java
src/main/java/net/mingsoft/config/WebConfig.java
+3
-3
application.yml
src/main/resources/application.yml
+5
-4
No files found.
src/main/java/net/mingsoft/config/WebConfig.java
View file @
f54fca30
...
...
@@ -127,9 +127,9 @@ public class WebConfig implements WebMvcConfigurer {
//XSS过滤器
@Bean
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.
xssE
nable:false}"
)
boolean
xssEnable
,
@Value
(
"${ms.xss.filter
Url}
"
)
String
filterUrl
,
@Value
(
"${ms.xss.exclude
Url}
"
)
String
excludeUrl
)
{
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.
e
nable: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
();
...
...
src/main/resources/application.yml
View file @
f54fca30
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
...
...
@@ -21,9 +22,9 @@ logging:
ms
:
xss
:
xssE
nable
:
true
#xss过滤器的开关
filter
U
rl
:
/**
#过滤的url,多个用逗号分开
exclude
U
rl
:
/static/**,/template/**,/file/upload.do,/static/plugins/ueditor/1.4.3.3/jsp/editor.do
#排除的url,多个用逗号分开
e
nable
:
true
#xss过滤器的开关
filter
-u
rl
:
/**
#过滤的url,多个用逗号分开
exclude
-u
rl
:
/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位长度,不填写默认随机生成
...
...
Write
Preview
Markdown
is supported
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