diff --git a/src/client.py b/src/client.py
index cc7ac218..67c84c9b 100644
--- a/src/client.py
+++ b/src/client.py
@@ -194,7 +194,8 @@ def createClientBlueprint(wireguardConfigurations: dict[WireguardConfiguration],
@client.get(prefix)
def ClientIndex():
- return render_template('client.html')
+ app_prefix = dashboardConfig.GetConfig("Server", "app_prefix")[1]
+ return render_template('client.html', APP_PREFIX=app_prefix)
@client.get(f'{prefix}/api/serverInformation')
def ClientAPI_ServerInformation():
diff --git a/src/dashboard.py b/src/dashboard.py
index ec57ef9d..76a719bf 100644
--- a/src/dashboard.py
+++ b/src/dashboard.py
@@ -72,7 +72,11 @@ def ResponseObject(status=True, message=None, data=None, status_code = 200) -> F
'''
Flask App
'''
-app = Flask("WGDashboard", template_folder=os.path.abspath("./static/dist/WGDashboardAdmin"))
+_, APP_PREFIX_INIT = DashboardConfig().GetConfig("Server", "app_prefix")
+app = Flask("WGDashboard",
+ template_folder=os.path.abspath("./static/dist/WGDashboardAdmin"),
+ static_folder=os.path.abspath("./static/dist/WGDashboardAdmin"),
+ static_url_path=APP_PREFIX_INIT if APP_PREFIX_INIT else '')
def peerInformationBackgroundThread():
global WireguardConfigurations
@@ -250,7 +254,8 @@ def auth_req():
'/static/', 'validateAuthentication', 'authenticate', 'getDashboardConfiguration',
'getDashboardTheme', 'getDashboardVersion', 'sharePeer/get', 'isTotpEnabled', 'locale',
'/fileDownload',
- '/client'
+ '/client',
+ '/assets/', '/img/', '/json/'
]
if (("username" not in session or session.get("role") != "admin")
@@ -1698,7 +1703,7 @@ Index Page
@app.get(f'{APP_PREFIX}/')
def index():
- return render_template('index.html')
+ return render_template('index.html', APP_PREFIX=APP_PREFIX)
if __name__ == "__main__":
startThreads()
diff --git a/src/static/app/index.html b/src/static/app/index.html
index 0c731866..7cfbd9e1 100644
--- a/src/static/app/index.html
+++ b/src/static/app/index.html
@@ -6,10 +6,14 @@
-
-
+
+