You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#31361, and add tests
And this PR introduces an undocumented & debug-purpose-only config
option: `USE_SUB_URL_PATH`. It does nothing for end users, it only helps
the development of sub-path related problems.
And also fix#31366
Co-authored-by: @ExplodingDragon
// GuessCurrentAppURL tries to guess the current full URL by http headers. It always has a '/' suffix, exactly the same as setting.AppURL
60
+
// GuessCurrentAppURL tries to guess the current full app URL (with sub-path) by http headers. It always has a '/' suffix, exactly the same as setting.AppURL
Copy file name to clipboardExpand all lines: modules/setting/server.go
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -40,16 +40,16 @@ const (
40
40
LandingPageLoginLandingPage="/user/login"
41
41
)
42
42
43
+
// Server settings
43
44
var (
44
-
// AppName is the Application name, used in the page title.
45
-
// It maps to ini:"APP_NAME"
46
-
AppNamestring
47
45
// AppURL is the Application ROOT_URL. It always has a '/' suffix
48
46
// It maps to ini:"ROOT_URL"
49
47
AppURLstring
50
48
// AppSubURL represents the sub-url mounting point for gitea. It is either "" or starts with '/' and ends without '/', such as '/{subpath}'.
51
49
// This value is empty if site does not have sub-url.
52
50
AppSubURLstring
51
+
// UseSubURLPath makes Gitea handle requests with sub-path like "/sub-path/owner/repo/...", to make it easier to debug sub-path related problems without a reverse proxy.
52
+
UseSubURLPathbool
53
53
// AppDataPath is the default path for storing data.
54
54
// It maps to ini:"APP_DATA_PATH" in [server] and defaults to AppWorkPath + "/data"
55
55
AppDataPathstring
@@ -59,8 +59,6 @@ var (
59
59
// AssetVersion holds a opaque value that is used for cache-busting assets
0 commit comments