Skip to content

Commit

Permalink
added security config to remove login hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
Junotas committed Jul 15, 2024
1 parent 1dee65e commit b671dad
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.example.workreportbackend.security;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration
@EnableWebSecurity
public class SecurityConfig {

@Bean
SecurityFilterChain defaultChain(HttpSecurity http) throws Exception {
return http
.authorizeHttpRequests(auth -> auth
.anyRequest().permitAll() // Allow all requests without authentication
)
.cors(Customizer.withDefaults())
.build();
}
}

0 comments on commit b671dad

Please sign in to comment.