ru.foodtechlab.lib.auth.app.config.SpringWebMvcConfig Maven / Gradle / Ivy
package ru.foodtechlab.lib.auth.app.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 SpringWebMvcConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
//.allowCredentials(true)
.allowedHeaders("origin", "content-type", "x-auth-token", "x-device-token", "x-device-type", "x-requested-with")
.allowedMethods("PUT", "GET", "POST", "PATCH", "DELETE", "OPTION");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy