Skip to content

Commit

Permalink
[FIX] CORS 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SolfE authored Oct 26, 2024
1 parent b2521e1 commit 76e211a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/com/catspot/cors/WebMvcConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.catspot.cors;

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 WebMvcConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedMethods("GET")
.allowedOrigins("http://localhost:5173", "https://catspot-dev.web.app");
}
}

0 comments on commit 76e211a

Please sign in to comment.