Added webconfig, to disable cors.

This commit is contained in:
FlorianSpeicher
2025-06-03 21:47:22 +02:00
parent e4a97ad387
commit f32cc02eb7

View File

@@ -0,0 +1,16 @@
package de.htwsaar.webshop.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
}