1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix LFS URL (#33840)

Fix #33839
This commit is contained in:
wxiaoguang
2025-03-10 17:36:02 +08:00
committed by GitHub
parent 34e5df6d30
commit c102492e5a
11 changed files with 131 additions and 21 deletions

View File

@@ -40,6 +40,10 @@ func NewInternalRequest(ctx context.Context, url, method string) *httplib.Reques
Ensure you are running in the correct environment or set the correct configuration file with -c.`, setting.CustomConf)
}
if !strings.HasPrefix(url, setting.LocalURL) {
log.Fatal("Invalid internal request URL: %q", url)
}
req := httplib.NewRequest(url, method).
SetContext(ctx).
Header("X-Real-IP", getClientIP()).