Skip to content

Commit

Permalink
[feat] localhost:5173 CORS 허용해요
Browse files Browse the repository at this point in the history
[feat] localhost:5173 CORS 허용해요
  • Loading branch information
yaeoni authored Aug 2, 2024
2 parents c213f2c + 3555a20 commit 4b06908
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/src/main/kotlin/com/mashup/dojo/config/WebConfiguration.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.mashup.dojo.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 WebConfiguration : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:5173")
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE")
}
}

0 comments on commit 4b06908

Please sign in to comment.