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
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/api/**")
|
||||
.allowedOrigins("http://localhost:3000")
|
||||
.allowedOrigins("https://forms.alttd.com")
|
||||
.allowedOrigins("http://localhost:3000", "https://forms.alttd.com")
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE")
|
||||
.allowedHeaders("*")
|
||||
.allowCredentials(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user