api changes
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package net.miarma.contaminus.common;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class Host {
|
||||
static ConfigManager configManager = ConfigManager.getInstance();
|
||||
static String host = configManager.getStringProperty("inet.host");
|
||||
@@ -20,11 +18,4 @@ public class Host {
|
||||
public static int getWebserverPort() {
|
||||
return webserverPort;
|
||||
}
|
||||
|
||||
public static Set<String> getOrigins() {
|
||||
return Set.of("http://" + origin + ":" + webserverPort,
|
||||
"https://" + origin + ":" + webserverPort);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public class ApiVerticle extends AbstractVerticle {
|
||||
Set<String> allowedHeaders = new HashSet<>(Arrays.asList("Content-Type", "Authorization"));
|
||||
|
||||
router.route().handler(CorsHandler.create()
|
||||
.addOrigin("*")
|
||||
.allowCredentials(true)
|
||||
.allowedHeaders(allowedHeaders)
|
||||
.allowedMethods(allowedMethods));
|
||||
|
||||
@@ -9,6 +9,5 @@ dp.poolSize=5
|
||||
|
||||
# Server Configuration
|
||||
inet.host=localhost
|
||||
inet.origin=localhost
|
||||
webserver.port=8080
|
||||
api.port=8081
|
||||
|
||||
Reference in New Issue
Block a user