Skip to content

Commit

Permalink
backend config: add WebConfig to allow Cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Arabasta committed Jul 13, 2024
1 parent cc3763e commit 6ff75f1
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.keiyam.spring_backend.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
}

0 comments on commit 6ff75f1

Please sign in to comment.