From 920c0bde2da8b5c7e518b090fde654071715b7d1 Mon Sep 17 00:00:00 2001
From: Kyle D
Date: Wed, 13 Jan 2021 08:53:17 -0700
Subject: [PATCH 1/4] Kd/add bountysource (#14323)
* Add bountysource to Sponsors link
* Add badge to readme
---
.github/FUNDING.yml | 1 +
README.md | 3 +++
README_ZH.md | 3 +++
3 files changed, 7 insertions(+)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 1447a6ea322b..624a2d97db19 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1,2 @@
open_collective: gitea
+custom: https://www.bountysource.com/teams/gitea
diff --git a/README.md b/README.md
index 8fd3f5f606e8..23ed06dbe399 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,9 @@
+
+
+
diff --git a/README_ZH.md b/README_ZH.md
index cb3c7d64b70c..037f27dc9d35 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -42,6 +42,9 @@
+
+
+
From 648d85d426044686c8fd03591401c1c9d21ed3fa Mon Sep 17 00:00:00 2001
From: GiteaBot
Date: Wed, 13 Jan 2021 15:54:47 +0000
Subject: [PATCH 2/4] [skip ci] Updated translations via Crowdin
---
options/locale/locale_zh-TW.ini | 2 ++
1 file changed, 2 insertions(+)
diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini
index 4864698eeb1b..b1eb4eaabb13 100644
--- a/options/locale/locale_zh-TW.ini
+++ b/options/locale/locale_zh-TW.ini
@@ -821,6 +821,8 @@ tag=標籤
released_this=發佈了此版本
file_raw=原始文件
file_history=歷史記錄
+file_view_source=檢視原始碼
+file_view_rendered=檢視渲染圖
file_view_raw=查看原始文件
file_permalink=永久連結
file_too_large=檔案太大,無法顯示。
From 954aeefb05ee48a8c4ff6006ea449f313a6b9848 Mon Sep 17 00:00:00 2001
From: techknowlogick
Date: Wed, 13 Jan 2021 10:55:52 -0500
Subject: [PATCH 3/4] Update Link
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 23ed06dbe399..ea0d83c9081a 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@
-
+
From edbc5c86dfda07a0eada0acd7461a610fee00ae3 Mon Sep 17 00:00:00 2001
From: Kyungmin Bae
Date: Thu, 14 Jan 2021 05:30:46 +0900
Subject: [PATCH 4/4] Use Request.URL.RequestURI() for fcgi (#14312) (#14314)
---
custom/conf/app.example.ini | 2 +-
routers/routes/chi.go | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 045b4cfed75b..e68727eb8452 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -867,7 +867,7 @@ MACARON = file
ROUTER_LOG_LEVEL = Info
ROUTER = console
ENABLE_ACCESS_LOG = false
-ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
+ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
ACCESS = file
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
LEVEL = Info
diff --git a/routers/routes/chi.go b/routers/routes/chi.go
index 6e609fc2f8b2..16fd6ea9052c 100644
--- a/routers/routes/chi.go
+++ b/routers/routes/chi.go
@@ -86,14 +86,14 @@ func LoggerHandler(level log.Level) func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
start := time.Now()
- _ = log.GetLogger("router").Log(0, level, "Started %s %s for %s", log.ColoredMethod(req.Method), req.RequestURI, req.RemoteAddr)
+ _ = log.GetLogger("router").Log(0, level, "Started %s %s for %s", log.ColoredMethod(req.Method), req.URL.RequestURI(), req.RemoteAddr)
next.ServeHTTP(w, req)
ww := middleware.NewWrapResponseWriter(w, req.ProtoMajor)
status := ww.Status()
- _ = log.GetLogger("router").Log(0, level, "Completed %s %s %v %s in %v", log.ColoredMethod(req.Method), req.RequestURI, log.ColoredStatus(status), log.ColoredStatus(status, http.StatusText(status)), log.ColoredTime(time.Since(start)))
+ _ = log.GetLogger("router").Log(0, level, "Completed %s %s %v %s in %v", log.ColoredMethod(req.Method), req.URL.RequestURI(), log.ColoredStatus(status), log.ColoredStatus(status, http.StatusText(status)), log.ColoredTime(time.Since(start)))
})
}
}
@@ -107,12 +107,12 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
return
}
- if !strings.HasPrefix(req.RequestURI, "/"+prefix) {
+ if !strings.HasPrefix(req.URL.RequestURI(), "/"+prefix) {
next.ServeHTTP(w, req)
return
}
- rPath := strings.TrimPrefix(req.RequestURI, "/"+prefix)
+ rPath := strings.TrimPrefix(req.URL.RequestURI(), "/"+prefix)
u, err := objStore.URL(rPath, path.Base(rPath))
if err != nil {
if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) {
@@ -139,12 +139,12 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
return
}
- if !strings.HasPrefix(req.RequestURI, "/"+prefix) {
+ if !strings.HasPrefix(req.URL.RequestURI(), "/"+prefix) {
next.ServeHTTP(w, req)
return
}
- rPath := strings.TrimPrefix(req.RequestURI, "/"+prefix)
+ rPath := strings.TrimPrefix(req.URL.RequestURI(), "/"+prefix)
rPath = strings.TrimPrefix(rPath, "/")
fi, err := objStore.Stat(rPath)