Fix frontend from other loc
This commit is contained in:
@@ -69,6 +69,12 @@ public class ConfigManager {
|
|||||||
getOS() == OSType.LINUX ? ".config/contaminus/" :
|
getOS() == OSType.LINUX ? ".config/contaminus/" :
|
||||||
".contaminus/");
|
".contaminus/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getWebRoot() {
|
||||||
|
return config.getProperty("web.root") != null ?
|
||||||
|
config.getProperty("web.root") :
|
||||||
|
getBaseDir() + "webroot/";
|
||||||
|
}
|
||||||
|
|
||||||
public static OSType getOS() {
|
public static OSType getOS() {
|
||||||
String os = System.getProperty("os.name").toLowerCase();
|
String os = System.getProperty("os.name").toLowerCase();
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ public class WebServerVerticle extends AbstractVerticle {
|
|||||||
|
|
||||||
router.route("/*")
|
router.route("/*")
|
||||||
.handler(
|
.handler(
|
||||||
StaticHandler.create("webroot")
|
StaticHandler.create(configManager.getWebRoot())
|
||||||
|
.setCachingEnabled(false)
|
||||||
.setDefaultContentEncoding("UTF-8")
|
.setDefaultContentEncoding("UTF-8")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user