We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d9bdcc3 + 192429d commit 3a75519Copy full SHA for 3a75519
src/main/java/net/javadiscord/javabot/api/routes/WebConfigurer.java
@@ -0,0 +1,17 @@
1
+package net.javadiscord.javabot.api.routes;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
5
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6
7
+/**
8
+ * Configures the web API.
9
+ * This class enables CORS for all endpoints.
10
+ */
11
+@Configuration
12
+public class WebConfigurer implements WebMvcConfigurer {
13
+ @Override
14
+ public void addCorsMappings(CorsRegistry registry) {
15
+ registry.addMapping("/**");
16
+ }
17
+}
0 commit comments