Skip to content
Snippets Groups Projects
Commit ffbd83f3 authored by Byron Biggs's avatar Byron Biggs
Browse files

Revert "Added WebConfig file (for api)"

This reverts commit c086cfcc
parent 6ac5e59a
No related branches found
No related tags found
1 merge request!6Revert "Added WebConfig file (for api)"
package com.example.demo.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 WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("*") // Allow any origin - replace with specific origins in production
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.maxAge(3600); // 1 hour cache for CORS preflight requests
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment