Require authentication for backend proxy
This commit is contained in:
@@ -21,6 +21,10 @@ public class SecurityConfig {
|
||||
return http
|
||||
.csrf(csrf -> csrf.disable())
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/auth/**").permitAll()
|
||||
.requestMatchers("/debug/**").permitAll()
|
||||
.requestMatchers("/admin/**").permitAll()
|
||||
.requestMatchers("/api/backend/**").authenticated()
|
||||
.anyRequest().permitAll()
|
||||
)
|
||||
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)
|
||||
|
||||
Reference in New Issue
Block a user