Skip to content

Commit

Permalink
Merge pull request #116 from mash-up-kr/chore/cors
Browse files Browse the repository at this point in the history
chore: Allow CORS All
  • Loading branch information
K-Diger authored Jul 29, 2024
2 parents eb95181 + 9e8de65 commit 5ceed29
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.piikii.input.http.web.config

import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration
class WebConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true)
.maxAge(3600)
}
}

0 comments on commit 5ceed29

Please sign in to comment.