Skip to content

Commit

Permalink
Merge pull request #322 from kSideProject/dev
Browse files Browse the repository at this point in the history
[Infra] dev 브랜치를 main 브랜치로 병합
  • Loading branch information
minisundev authored Dec 10, 2024
2 parents 4758f12 + f830543 commit 1f382ac
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class WebFluxStaticResourceConfig : WebFluxConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("GET", "POST", "DELETE", "PUT", "FETCH")
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class WebMvcStaticResourceConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("GET", "POST", "DELETE", "PUT", "FETCH")
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
}
}
76 changes: 0 additions & 76 deletions front/src/components/Layout/FriendsRightSideBar.tsx

This file was deleted.

55 changes: 0 additions & 55 deletions front/src/components/Layout/MemberListItem.tsx

This file was deleted.

76 changes: 0 additions & 76 deletions front/src/components/Layout/MessageRightSideBar.tsx

This file was deleted.

103 changes: 0 additions & 103 deletions front/src/components/Layout/ServerInfoSidebar.tsx

This file was deleted.

25 changes: 25 additions & 0 deletions user/src/main/kotlin/kpring/user/config/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,38 @@ package kpring.user.config

import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
import org.springframework.security.crypto.password.PasswordEncoder
import org.springframework.security.web.SecurityFilterChain
import org.springframework.web.cors.CorsConfiguration

@Configuration
@EnableWebSecurity
class SecurityConfig {
@Bean
fun encode(): PasswordEncoder {
return BCryptPasswordEncoder()
}

@Bean
fun filterChain(http: HttpSecurity): SecurityFilterChain {
http
.cors { cors ->
cors.configurationSource {
val cors = CorsConfiguration()
cors.allowedOrigins = listOf("http://localhost:3000")
cors.allowedMethods = listOf("GET", "POST", "PUT", "DELETE", "PATCH")
cors.allowedHeaders = listOf("*")
cors.allowCredentials = true
cors
}
}
.csrf { it.disable() }
.formLogin { it.disable() }
.httpBasic { }

return http.build()
}
}

0 comments on commit 1f382ac

Please sign in to comment.