Disabled Auth to allow all access to api

This commit is contained in:
Justin xzHome
2024-10-01 11:34:30 +09:00
parent 59078762b5
commit 99ce3731c1

View File

@@ -65,6 +65,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable().cors().and()
.authorizeRequests().anyRequest().permitAll();
/* 주석처리 - 백앤드에 모든 사용자가 접근할수 있도록 ...
http.csrf().disable().cors().and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
@@ -76,9 +80,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.exceptionHandling()
.authenticationEntryPoint(exceptionHandler).and()
.addFilterBefore(authenticationFilter, UsernamePasswordAuthenticationFilter.class);
*/
}
@Bean
CorsConfigurationSource corsConfigurationSource() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();