Update CORS allowed origins configuration
Consolidated the allowed origins into a single `allowedOrigins` call. This ensures both local and production environments are correctly configured for CORS.
This commit is contained in:
parent
34255c93c8
commit
04088c20e5
|
|
@ -15,8 +15,7 @@ public class WebConfig implements WebMvcConfigurer { //TODO this can be done wit
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry.addMapping("/api/**")
|
registry.addMapping("/api/**")
|
||||||
.allowedOrigins("http://localhost:3000")
|
.allowedOrigins("http://localhost:3000", "https://forms.alttd.com")
|
||||||
.allowedOrigins("https://forms.alttd.com")
|
|
||||||
.allowedMethods("GET", "POST", "PUT", "DELETE")
|
.allowedMethods("GET", "POST", "PUT", "DELETE")
|
||||||
.allowedHeaders("*")
|
.allowedHeaders("*")
|
||||||
.allowCredentials(true);
|
.allowCredentials(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user