From 43ba212539edb7ebbcfd01a94be84914e4ed245d Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 19 Aug 2020 14:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0url=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/filter/CpAuthGatewayFilterFactory.java | 8 ++++++++ .../src/main/java/com/epmet/filter/CpProperty.java | 5 +++++ epmet-gateway/src/main/resources/bootstrap.yml | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java index 7aec3a7f6f..43fbf6d0cb 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java @@ -208,11 +208,19 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory urls; + /** + * 白名单 + */ + private List urlWhiteList; + /** * 不处理token,直接通过 */ diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index c2105542bb..0e8c054d2e 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -427,6 +427,12 @@ epmet: - /gov/issue/** - /gov/project/** - /resi/home/** + - /data/report/** + + # url认证白名单,先判断白名单,在白名单中的url直接放行,不再判断上述需要认证的名单 + urlWhiteList: + - /data/report/test/test + swaggerUrls: jwt: