mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
🔒 Fixing security issues. close #3491 关闭swagger时,swagger页面404但是/admin/v2/api-docs仍能获取到信息
This commit is contained in:
1 parent
42c388e186
commit
23b0bb7453
1 file changed
+3
-1
+3
-1
@@ -76,7 +76,9 @@ public class GatewaySwaggerAutoConfiguration {
|
||||
else {
|
||||
// 关闭时,返回404
|
||||
return RouterFunctions
|
||||
.route(RequestPredicates.GET("/swagger-ui/**").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
.route(RequestPredicates.GET("/*/v2/api-docs").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
serverRequest -> ServerResponse.notFound().build())
|
||||
.andRoute(RequestPredicates.GET("/swagger-ui/**").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
serverRequest -> ServerResponse.notFound().build())
|
||||
.andRoute(RequestPredicates.GET("/doc.html").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
serverRequest -> ServerResponse.notFound().build());
|
||||
|
||||
Reference in new issue
Block a user