新增允许的网站来源地址指定参数 shiro.allowReferers 避免一些跨站点请求伪造CSRF
This commit is contained in:
@@ -351,6 +351,10 @@ shiro:
|
|||||||
# 是否允许接收跨域的Cookie凭证数据
|
# 是否允许接收跨域的Cookie凭证数据
|
||||||
# accessControlAllowCredentials: true
|
# accessControlAllowCredentials: true
|
||||||
|
|
||||||
|
# 允许的网站来源地址,不设置为全部地址(避免一些跨站点请求伪造CSRF)
|
||||||
|
# allowReferers: http://127.0.0.1,http://localhost
|
||||||
|
# allowReferers: ~
|
||||||
|
|
||||||
# 是否在登录后生成新的Session(默认false)
|
# 是否在登录后生成新的Session(默认false)
|
||||||
isGenerateNewSessionAfterLogin: false
|
isGenerateNewSessionAfterLogin: false
|
||||||
|
|
||||||
|
|||||||
@@ -391,6 +391,10 @@ logging:
|
|||||||
# # 是否允许接收跨域的Cookie凭证数据
|
# # 是否允许接收跨域的Cookie凭证数据
|
||||||
## accessControlAllowCredentials: true
|
## accessControlAllowCredentials: true
|
||||||
#
|
#
|
||||||
|
# # 允许的网站来源地址,不设置为全部地址(避免一些跨站点请求伪造CSRF)
|
||||||
|
# allowReferers: http://127.0.0.1,http://localhost
|
||||||
|
# allowReferers: ~
|
||||||
|
#
|
||||||
# # 是否在登录后生成新的Session(默认false)
|
# # 是否在登录后生成新的Session(默认false)
|
||||||
# isGenerateNewSessionAfterLogin: false
|
# isGenerateNewSessionAfterLogin: false
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user