production and staging(development)
This commit is contained in:
@@ -160,6 +160,20 @@ public class WebSecurityConfig implements WebMvcConfigurer {// extends WebSecuri
|
||||
registry.addResourceHandler("/" + dirName + "/**").addResourceLocations("file:/"+ uploadPath + "/");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
// Разрешаем основной домен, стейджинг и вложенные проекты пользователей
|
||||
.allowedOriginPatterns(
|
||||
"https://jambotron.com",
|
||||
"https://*.jambotron.com", // user1.jambotron.com
|
||||
"https://*.*.jambotron.com", // project1.user1.jambotron.com
|
||||
"https://*.staging.jambotron.com" // dev-feature.staging.jambotron.com
|
||||
)
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
.allowedHeaders("*")
|
||||
.allowCredentials(true); // Нужно для работы с сессиями и куками
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user