adding antmatchers for single container

This commit is contained in:
2026-08-27 19:13:41 +00:00
parent f467c9916c
commit 03f75b7ca3
@@ -118,14 +118,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
}
// }
@NoLogging
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf(csrf -> csrf.disable())
// Add CORS Filter //http.cors().and().csrf().disable().
.addFilterBefore(new CorsFilter(), ChannelProcessingFilter.class)
.authorizeRequests(requests -> requests.antMatchers("/token/**").permitAll().antMatchers("/log2/**")
// adding backend/token for single container by Azmat 27-08
.authorizeRequests(requests -> requests.antMatchers("/token/**", "/backend/token/**", "/**/backend/token/**").permitAll().antMatchers("/log2/**")
.permitAll().antMatchers("/api/**").permitAll()
// .antMatchers("/SqlworkbenchSqlcont/**").hasRole("ADMIN")
.anyRequest().authenticated())
@@ -139,6 +139,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
}
@Bean
public SessionRegistry sessionRegistry() {
return new SessionRegistryImpl(); // This tracks active sessions