安全路径白名单前缀修改

This commit is contained in:
macro 2019-11-23 14:19:52 +08:00
parent 35c2b60d2f
commit 01c9615096
3 changed files with 33 additions and 32 deletions

View File

@ -13,21 +13,22 @@ jwt:
expiration: 604800 #JWT的超期限时间(60*60*24)
tokenHead: Bearer #JWT负载中拿到开头
ignored: #安全路径白名单
urls:
- /swagger-ui.html
- /swagger-resources/**
- /swagger/**
- /**/v2/api-docs
- /**/*.js
- /**/*.css
- /**/*.png
- /**/*.ico
- /webjars/springfox-swagger-ui/**
- /actuator/**
- /druid/**
- /admin/login
- /admin/register
secure:
ignored:
urls: #安全路径白名单
- /swagger-ui.html
- /swagger-resources/**
- /swagger/**
- /**/v2/api-docs
- /**/*.js
- /**/*.css
- /**/*.png
- /**/*.ico
- /webjars/springfox-swagger-ui/**
- /actuator/**
- /druid/**
- /admin/login
- /admin/register
aliyun:
oss:

View File

@ -13,21 +13,22 @@ jwt:
expiration: 604800 #JWT的超期限时间(60*60*24)
tokenHead: Bearer #JWT负载中拿到开头
ignored: #安全路径白名单
urls:
- /swagger-ui.html
- /swagger-resources/**
- /swagger/**
- /**/v2/api-docs
- /**/*.js
- /**/*.css
- /**/*.png
- /**/*.ico
- /webjars/springfox-swagger-ui/**
- /druid/**
- /actuator/**
- /sso/**
- /home/**
secure:
ignored:
urls: #安全路径白名单
- /swagger-ui.html
- /swagger-resources/**
- /swagger/**
- /**/v2/api-docs
- /**/*.js
- /**/*.css
- /**/*.png
- /**/*.ico
- /webjars/springfox-swagger-ui/**
- /druid/**
- /actuator/**
- /sso/**
- /home/**
# 自定义redis key
redis:

View File

@ -1,6 +1,5 @@
package com.macro.mall.security.config;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -14,7 +13,7 @@ import java.util.List;
*/
@Getter
@Setter
@ConfigurationProperties(prefix = "ignored")
@ConfigurationProperties(prefix = "secure.ignored")
public class IgnoreUrlsConfig {
private List<String> urls = new ArrayList<>();