Browse Source

cors

master
지대한 2 years ago
parent
commit
8edfea5e31
  1. 14
      src/main/java/com/palnet/board/config/WebConfig.java

14
src/main/java/com/palnet/board/config/WebConfig.java

@ -0,0 +1,14 @@
package com.palnet.board.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 WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*");
}
}
Loading…
Cancel
Save