From 8635f6bb05649195fede8aba8374dcf97ce16040 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Tue, 4 Mar 2025 10:27:55 +0800 Subject: [PATCH] =?UTF-8?q?:hammer:=20=E4=BF=AE=E6=94=B9=E9=9D=99=E6=80=81?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=8C=BF=E5=90=8D=E5=A4=84=E7=90=86=E7=AD=96?= =?UTF-8?q?=E7=95=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...icResourceAuthorizeRequestsCustomizer.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/org/dromara/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/org/dromara/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java index 4b47b7b6..03610601 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/org/dromara/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/org/dromara/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java @@ -38,7 +38,27 @@ public class StaticResourceAuthorizeRequestsCustomizer extends AuthorizeRequests @Override public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // 静态资源可匿名访问 - registry.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll(); + registry.antMatchers(HttpMethod.GET, + "/*.html", + "/*.css", + "/*.js", + "/*.gz", + "/*.ico", + "/*.jpg", + "/*.png", + "/*.svg", + "/*.json", + "/*.webmanifest", + "/**/*.html", + "/**/*.css", + "/**/*.js", + "/**/*.gz", + "/**/*.ico", + "/**/*.jpg", + "/**/*.png", + "/**/*.svg", + "/**/*.json" + ).permitAll(); } }