diff --git a/app/library/HttpAPI.py b/app/library/HttpAPI.py
index b45d5bcb..f629d777 100644
--- a/app/library/HttpAPI.py
+++ b/app/library/HttpAPI.py
@@ -263,14 +263,14 @@ class HttpAPI:
response: Response = await handler(request)
contentType: str | None = response.headers.get("content-type", None)
- if contentType and "/" != base_path and contentType.startswith("text/html"):
+ if contentType and contentType.startswith("text/html"):
rewrite_path: str = base_path.rstrip("/")
async with await anyio.open_file(response._path, "rb") as f:
content = await f.read()
content: str = (
content.decode("utf-8")
.replace('', f'')
- .replace('baseURL:""', f'baseURL:"{rewrite_path}/"')
+ .replace("/_base_path/", f"{rewrite_path}/")
)
new_response = web.Response(text=content, content_type="text/html")
diff --git a/app/library/config.py b/app/library/config.py
index 7331629b..8a83578b 100644
--- a/app/library/config.py
+++ b/app/library/config.py
@@ -359,6 +359,9 @@ class Config:
if isinstance(self.pictures_backends, str) and self.pictures_backends:
self.pictures_backends = self.pictures_backends.split(",")
+ if not self.base_path.endswith("/"):
+ self.base_path += "/"
+
numeric_level = getattr(logging, self.log_level.upper(), None)
if not isinstance(numeric_level, int):
msg = f"Invalid log level '{self.log_level}' specified."
@@ -371,7 +374,7 @@ class Config:
encoding="utf-8",
)
- LOG = logging.getLogger("config")
+ LOG: logging.Logger = logging.getLogger("config")
if self.debug:
try:
diff --git a/ui/nuxt.config.ts b/ui/nuxt.config.ts
index f915b270..2abc2378 100644
--- a/ui/nuxt.config.ts
+++ b/ui/nuxt.config.ts
@@ -37,7 +37,7 @@ export default defineNuxtConfig({
transpile: ['vue-toastification'],
},
app: {
- baseURL: 'production' == process.env.NODE_ENV ? '' : '/',
+ baseURL: 'production' == process.env.NODE_ENV ? '/_base_path/' : '/',
buildAssetsDir: "assets",
head: {
"meta": [