url_prefix do not work in Glances < 4.2.0 - Correct issue with mount #2912

pull/2923/head
nicolargo 2024-08-10 14:58:59 +02:00
parent 7f049669fb
commit 9c09d6b4a4
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ class GlancesRestfulApi:
router.add_api_route('/', response_class=HTMLResponse, endpoint=self._index) router.add_api_route('/', response_class=HTMLResponse, endpoint=self._index)
# Statics files # Statics files
self._app.mount(urljoin(self.url_prefix, '/static'), StaticFiles(directory=self.STATIC_PATH), name="static") self._app.mount(self.url_prefix + '/static', StaticFiles(directory=self.STATIC_PATH), name="static")
logger.info(f"Get WebUI in {self.STATIC_PATH}") logger.info(f"Get WebUI in {self.STATIC_PATH}")