Skip to content

Commit

Permalink
fix: ws-cors poc
Browse files Browse the repository at this point in the history
  • Loading branch information
DongGeon0908 committed Aug 20, 2024
1 parent 3000908 commit 644c734
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/kotlin/com/hero/alignlab/config/web/WebFluxConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ class WebFluxConfig(
.allowedHeaders(CorsConfiguration.ALL)
.allowCredentials(true)
.maxAge(3600)

/** ws registry */
registry.addMapping("/ws/**")
.allowedOriginPatterns(CorsConfiguration.ALL)
.allowedMethods(CorsConfiguration.ALL)
.allowedHeaders(CorsConfiguration.ALL)
.allowCredentials(true)
.maxAge(3600)
}

override fun configureHttpMessageCodecs(configurer: ServerCodecConfigurer) {
Expand Down

0 comments on commit 644c734

Please sign in to comment.