Skip to content

Commit

Permalink
Merge pull request #217 from TEAM-SAMSION/PET-312
Browse files Browse the repository at this point in the history
PET-312 feat : CorsConfig 추가
  • Loading branch information
isprogrammingfun authored Jun 7, 2024
2 parents 250de70 + 94cfe09 commit 0b23349
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.pawith.commonmodule.config;

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

@Configuration
public class CorsConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:5173", "https://hello-flowith.vercel.app")
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH")
.allowedHeaders("*");

}

}

0 comments on commit 0b23349

Please sign in to comment.