aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/admin/admin_test.go
diff options
context:
space:
mode:
authorJannis Pohl <838818+jannispl@users.noreply.github.com>2025-04-20 13:43:48 +0200
committerGitHub <noreply@github.com>2025-04-20 11:43:48 +0000
commitd1a3bd68140adcc76ad6163c02a1fe00d59aecae (patch)
treeb8f33b4cde1be43c8ae2cac87a14fe07441e22c3 /routers/web/admin/admin_test.go
parentaf6be75adb99ff42215a945927c016aa5e40dab2 (diff)
downloadgitea-main.tar.gz
gitea-main.zip
Make ROOT_URL support using request Host header (#32564)HEADmain
Resolve #32554 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/admin/admin_test.go')
-rw-r--r--routers/web/admin/admin_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/admin/admin_test.go b/routers/web/admin/admin_test.go
index a568c7c5c8..04fad4663c 100644
--- a/routers/web/admin/admin_test.go
+++ b/routers/web/admin/admin_test.go
@@ -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)