Last active
August 16, 2023 07:16
-
-
Save sandipchitale/4258bfea742c1518276000373a6517b5 to your computer and use it in GitHub Desktop.
Ignore resource #spring-security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public WebSecurityCustomizer webSecurityCustomizer() { | |
return (web) -> web.ignoring() | |
.requestMatchers( | |
// To avoid wrapping in MvcMatcher make sure to use AntPathRequestMatcher | |
AntPathRequestMatcher.antMatcher("/index.html"), | |
AntPathRequestMatcher.antMatcher("/**/*.css") | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment