File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/main/java/com/dmu/debug_visual/config Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public SecurityFilterChain jwtFilterChain(HttpSecurity http) throws Exception {
4545 .cors (cors -> cors .configurationSource (corsConfigurationSource ()))
4646 .csrf (AbstractHttpConfigurer ::disable )
4747 .authorizeHttpRequests (auth -> auth
48+ .requestMatchers (HttpMethod .GET , "/api/posts/**" , "/api/comments/**" ).permitAll ()
4849 .requestMatchers ("/api/admin/**" ).hasRole ("ADMIN" )
4950 .requestMatchers ("/api/posts/**" ).hasAnyRole ("USER" , "ADMIN" )
5051 .requestMatchers ("/api/notifications/**" ).hasAnyRole ("USER" , "ADMIN" )
@@ -78,6 +79,7 @@ public SecurityFilterChain publicFilterChain(HttpSecurity http) throws Exception
7879 "/v3/api-docs/**" ,
7980 "/api/code/**"
8081 ).permitAll ()
82+ .requestMatchers (HttpMethod .GET , "/api/posts/**" , "/api/comments/**" ).permitAll ()
8183 .anyRequest ().permitAll ()
8284 );
8385
You can’t perform that action at this time.
0 commit comments