Skip to content
Snippets Groups Projects

javadoc and testclasses for backend

Merged Heine Mærde Brakstad requested to merge addition into main
65 files
+ 3184
280
Compare changes
  • Side-by-side
  • Inline
Files
65
@@ -4,13 +4,22 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Configuration class for CORS (Cross-Origin Resource Sharing).
*/
@Configuration
public class CorsConfig implements WebMvcConfigurer {
/**
* Adds CORS mapping configuration.
*
* @param registry CorsRegistry instance to configure CORS mappings.
*/
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:5173")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*");
.allowedOrigins("http://localhost:5173")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*");
}
}
Loading