Add never option to PUBLIC_URL_DETECTION configuration (#36785)

Follow up #34250

Docs: https://gitea.com/gitea/docs/pulls/353

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Zettat123
2026-03-01 11:33:47 -07:00
committed by GitHub
parent 2c624d4deb
commit 5b8c8e724f
4 changed files with 22 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ RUN_USER = ; git
;; especially when the Gitea instance needs to be accessed in a container network.
;; * legacy: detect the public URL from "Host" header if "X-Forwarded-Proto" header exists, otherwise use "ROOT_URL".
;; * auto: always use "Host" header, and also use "X-Forwarded-Proto" header if it exists. If no "Host" header, use "ROOT_URL".
;; * never: always use "ROOT_URL", never detect from request headers.
;PUBLIC_URL_DETECTION = legacy
;;
;; For development purpose only. It makes Gitea handle sub-path ("/sub-path/owner/repo/...") directly when debugging without a reverse proxy.