diff options
author | terminaldweller <thabogre@gmail.com> | 2022-06-03 18:26:37 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-06-03 18:26:37 +0000 |
commit | 7f029b9421ed940f5ca3e7be1e691f5fc2e006a7 (patch) | |
tree | 27e2e56b8300ce2a5a3281361d761bf90b47f786 | |
parent | icons (diff) | |
download | mdrtl-7f029b9421ed940f5ca3e7be1e691f5fc2e006a7.tar.gz mdrtl-7f029b9421ed940f5ca3e7be1e691f5fc2e006a7.zip |
server config
Diffstat (limited to '')
-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"); + } +} |