Add server-side subpath support for WebUI (#1658)

* Add server-side subpath support for WebUI

- Add webUISubpath configuration setting with regex validation
- Create temporary WebUI directory for subpath serving
- Inject subpath config into index.html for client detection
- Support all WebUI flavors (WEBUI, VUI, CUSTOM) with subpath
- Update browser opening to use subpath URLs

Related to Suwayomi/Suwayomi-WebUI#174

* Fix review points

* Fix code formatting issues

* Fix import issue
This commit is contained in:
Soner Köksal
2025-09-23 22:53:53 +03:00
committed by GitHub
parent d142d3a25a
commit c7b4f226b3
4 changed files with 114 additions and 15 deletions

View File

@@ -759,6 +759,16 @@ class ServerConfig(
description = "Strategy to apply when remote progress is older than local.",
)
val webUISubpath: MutableStateFlow<String> by StringSetting(
protoNumber = 75,
group = SettingGroup.WEB_UI,
defaultValue = "",
pattern = "^(/[a-zA-Z0-9._-]+)*$".toRegex(),
description = "Serve WebUI under a subpath (e.g., /manga). Leave empty for root path. Must start with / if specified.",
requiresRestart = true,
)
/** ****************************************************************** **/
/** **/
/** Renamed settings **/