Make ROOT_URL support using request Host header (#32564)

Resolve #32554

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Jannis Pohlandwxiaoguang authored and GitHub committed 2025-04-20 11:43:48 +00:00
1 parent af6be75adb
commit d1a3bd6814
5 files changed
+80 -32

No files matched your search

+1
View File
@@ -76,6 +76,7 @@ func TestShadowPassword(t *testing.T) {
func TestSelfCheckPost(t *testing.T) {
defer test.MockVariableValue(&setting.AppURL, "http://config/sub/")()
defer test.MockVariableValue(&setting.AppSubURL, "/sub")()
defer test.MockVariableValue(&setting.UseHostHeader, false)()
ctx, resp := contexttest.MockContext(t, "GET http://host/sub/admin/self_check?location_origin=http://frontend")
SelfCheckPost(ctx)