Skip to content

Commit 5804658

Browse files
committed
Add FONTS location to StaticResourceLocation
Signed-off-by: Shahab Kondri <[email protected]>
1 parent 414117e commit 5804658

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ public enum StaticResourceLocation {
5050
/**
5151
* The {@code "favicon.ico"} resource.
5252
*/
53-
FAVICON("/favicon.*", "/*/icon-*");
53+
FAVICON("/favicon.*", "/*/icon-*"),
54+
55+
/**
56+
* Resources under {@code "/fonts"}.
57+
*/
58+
FONTS("/fonts/**");
5459

5560
private final String[] patterns;
5661

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void atCommonLocationsShouldMatchCommonLocations() {
5757
assertMatcher(matcher).matches("/favicon.ico");
5858
assertMatcher(matcher).matches("/favicon.png");
5959
assertMatcher(matcher).matches("/icons/icon-48x48.png");
60+
assertMatcher(matcher).matches("/fonts/font.woff2");
6061
assertMatcher(matcher).doesNotMatch("/bar");
6162
}
6263

0 commit comments

Comments
 (0)