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