diff options
-rw-r--r-- | src/main/java/com/terminaldweller/main/DevConfiguration.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/com/terminaldweller/main/DevConfiguration.java b/src/main/java/com/terminaldweller/main/DevConfiguration.java new file mode 100644 index 0000000..461e7bf --- /dev/null +++ b/src/main/java/com/terminaldweller/main/DevConfiguration.java @@ -0,0 +1,19 @@ +package com.terminaldweller; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +@Profile("development") +public class DevConfiguration implements WebMvcConfigurer { + + @Override + public void addCorsMappings(CorsRegistry registry) { + registry + .addMapping("/**") + .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") + .allowedOrigins("https://localhost:7080, https://editor.terminaldweller.com"); + } +} |