From 15a98c3eaca6953819b7c6a6982cea3123924b66 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 22 Dec 2024 22:05:05 +0800 Subject: [PATCH] add missing router path --- cmd/webserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/webserver.go b/cmd/webserver.go index acdc454a..185a0790 100644 --- a/cmd/webserver.go +++ b/cmd/webserver.go @@ -119,6 +119,10 @@ func startWebServer(c *core.CliContext) error { router.StaticFile("sw.js", filepath.Join(config.StaticRootPath, "sw.js")) router.GET("/server_settings.js", bindCachedJs(api.ServerSettings.ServerSettingsJavascriptHandler, serverSettingsCacheStore)) + for i := 0; i < len(workboxFileNames); i++ { + router.StaticFile("/"+workboxFileNames[i], filepath.Join(config.StaticRootPath, workboxFileNames[i])) + } + router.StaticFile("/mobile", filepath.Join(config.StaticRootPath, "mobile.html")) router.Static("/mobile/js", filepath.Join(config.StaticRootPath, "js")) router.Static("/mobile/css", filepath.Join(config.StaticRootPath, "css"))