Updated CORS
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.mattrixwv.cipherstream.config;
|
||||
|
||||
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
|
||||
@Component
|
||||
@EnableWebMvc
|
||||
public class WebConfig implements WebMvcConfigurer{
|
||||
@Override
|
||||
public void addCorsMappings(@NonNull CorsRegistry registry){
|
||||
registry.addMapping("/**")
|
||||
.allowedOriginPatterns("http://localhost:3000");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user