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
* giteaofficial/main:
Add API routes to lock and unlock issues (go-gitea#34165)
Make ROOT_URL support using request Host header (go-gitea#32564)
Valid email address should only start with alphanumeric (go-gitea#28174)
Fix notify watch failure when the content is too long (go-gitea#34233)
Add "--fullname" arg to gitea admin user create (go-gitea#34241)
Fix various UI problems (go-gitea#34243)
markup: improve code block readability and isolate copy button (go-gitea#34009)
Don't assume the default wiki branch is master in the wiki API (go-gitea#34244)
[skip ci] Updated translations via Crowdin
Optimize the calling code of queryElems (go-gitea#34235)
Actions Runner rest api (go-gitea#33873)
Fix some trivial problems (go-gitea#34237)
Swift files can be passed either as file or as form value (go-gitea#34068)
# Conflicts:
# templates/repo/wiki/revision.tmpl
// 1. The reverse proxy is configured correctly, it passes "X-Forwarded-Proto/Host" headers. Perfect, Gitea can handle it correctly.
71
71
// 2. The reverse proxy is not configured correctly, doesn't pass "X-Forwarded-Proto/Host" headers, eg: only one "proxy_pass http://gitea:3000" in Nginx.
72
72
// 3. There is no reverse proxy.
73
-
// Without an extra config option, Gitea is impossible to distinguish between case 2 and case 3,
74
-
// then case 2 would result in wrong guess like guessed AppURL becomes "http://gitea:3000/", which is not accessible by end users.
75
-
// So in the future maybe it should introduce a new config option, to let site admin decide how to guess the AppURL.
73
+
// Without more information, Gitea is impossible to distinguish between case 2 and case 3, then case 2 would result in
74
+
// wrong guess like guessed AppURL becomes "http://gitea:3000/" behind a "https" reverse proxy, which is not accessible by end users.
75
+
// So we introduced "UseHostHeader" option, it could be enabled by setting "ROOT_URL" to empty
76
76
reqScheme:=getRequestScheme(req)
77
77
ifreqScheme=="" {
78
+
// if no reverse proxy header, try to use "Host" header for absolute URL
0 commit comments