Commit 6131504a authored by 杨锐's avatar 杨锐

auth.http 支持全匹配/通配符匹配。

parent af14582f
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -27,11 +27,17 @@ public abstract class RequestInterceptor {
.collect(Collectors.toList());
}
/**
* *.xyqb.com *.q-gp.com *.quantgroup.cn
*
* @param host
* @return
*/
protected boolean auth(String host) {
if (authHttpList == null || authHttpList.isEmpty()) {
return false;
}
return authHttpList.contains(host);
return authHttpList.stream().map(authHttp -> authHttp.replace("*", "")).anyMatch(host::endsWith);
}
private static Optional<URL> apply(String http) {
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<groupId>cn.quantgroup</groupId>
<artifactId>enoch-agent-spring-boot-starter</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cn.quantgroup</groupId>
<artifactId>commons-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
......@@ -35,7 +35,7 @@
<lombok.version>1.16.20</lombok.version>
<guava.version>23.0</guava.version>
<apollo.client.version>0.10.2</apollo.client.version>
<common.parent.version>0.3.2</common.parent.version>
<common.parent.version>0.3.3</common.parent.version>
</properties>
<dependencies>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment