3x-ui/internal/web
Vladimir Avtsenov 89b1137b00
feat(env): allow setting the initial URI path for the web panel (#5149)
* feat(env): allow setting the initial URI path for the web panel

* fix(setting): normalize and guard XUI_INIT_WEB_BASE_PATH default

Address Copilot review on PR #5149: an env value that is empty, whitespace, or lacks slashes (e.g. `panel`) could produce an invalid webBasePath such as `/ /` and reach the frontend un-normalized.

getEnv now trims whitespace and falls back when the value is empty; the env-derived default is passed through the existing normalizeBasePath helper (reused from node.go) so it always carries a leading and trailing slash. GetBasePath reuses the same helper instead of duplicating the slash logic.

---------

Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-06-11 12:51:54 +02:00
..
controller feat: replace panel proxy URL with outbound-based egress bridge 2026-06-10 23:52:20 +02:00
entity feat: replace panel proxy URL with outbound-based egress bridge 2026-06-10 23:52:20 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
locale refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
middleware refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
network refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
runtime refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
service feat(env): allow setting the initial URI path for the web panel (#5149) 2026-06-11 12:51:54 +02:00
session refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
translation feat: replace panel proxy URL with outbound-based egress bridge 2026-06-10 23:52:20 +02:00
websocket refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
web.go refactor: replace custom geo manager with Xray-core native geodata auto-update 2026-06-10 18:27:12 +02:00