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