You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<1> Configure `HttpSecurity` to only be applied to URLs that start with `/api/`
1074
-
<2> Allow access to URLs that start with `/user/` to users with the `USER` role
1075
-
<3> Allow access to URLs that start with `/admin/` to users with the `ADMIN` role
1074
+
<2> Allow access to URLs that start with `/api/user/` to users with the `USER` role
1075
+
<3> Allow access to URLs that start with `/api/admin/` to users with the `ADMIN` role
1076
1076
<4> Any other request that doesn't match the rules above, will require authentication
1077
1077
1078
1078
The `securityMatcher(s)` and `requestMatcher(s)` methods will decide which `RequestMatcher` implementation fits best for your application: If {spring-framework-reference-url}web.html#spring-web[Spring MVC] is in the classpath, then {security-api-url}org/springframework/security/web/servlet/util/matcher/MvcRequestMatcher.html[`MvcRequestMatcher`] will be used, otherwise, {security-api-url}org/springframework/security/web/servlet/util/matcher/AntPathRequestMatcher.html[`AntPathRequestMatcher`] will be used.
@@ -1098,8 +1098,8 @@ public class SecurityConfig {
0 commit comments