Created
June 29, 2026 07:52
-
-
Save bastienapp/e2856ee724c9cfb129fd2bcfc5756e20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package co.simplon.springjwt.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 WebMvcConfig implements WebMvcConfigurer { | |
| @Override | |
| public void addCorsMappings(CorsRegistry registry) { | |
| registry.addMapping("/**") | |
| .allowedOrigins("http://url-du-frontend-ici"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment