Skip to content

Commit

Permalink
fix : (#29) cors
Browse files Browse the repository at this point in the history
  • Loading branch information
coehgns committed Feb 12, 2025
1 parent aa70134 commit 3a19578
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ class SecurityConfig(
fun securityFilterChain(
http: HttpSecurity,
clientRegistrationRepository: ClientRegistrationRepository,
corsConfigurationSource: CorsConfigurationSource
): SecurityFilterChain {
http
.cors { it.configurationSource(corsConfigurationSource) }
.csrf { it.disable() }
.headers { it.frameOptions { frame -> frame.sameOrigin() } }
.sessionManagement { it.sessionCreationPolicy(SessionCreationPolicy.STATELESS) }
.authorizeHttpRequests { auth ->
Expand Down

0 comments on commit 3a19578

Please sign in to comment.