dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit b52acb14a29d2778de8360db4d431a5762a268da
parent 52056ceb4f3bbd6756cb071f1083adf7ede54fb9
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 21 Jun 2023 21:44:11 -0700

cleaunp

Diffstat:
Mpkg/config/config.go | 1+
Mpkg/web/web.go | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/config/config.go b/pkg/config/config.go @@ -13,6 +13,7 @@ import ( ) const ( + GogsURL = "http://127.0.0.1:3000" DbFileName = "dkf.db" AppDirName = ".dkf" MaxUserFileUploadSize = 30 << 20 // 30 MB diff --git a/pkg/web/web.go b/pkg/web/web.go @@ -355,7 +355,7 @@ func getTorServer(db *database.DkfDB) *echo.Echo { host := c.Request().Host hostParts := strings.Split(host, ".") if hostParts[0] == "git" { - remote, _ := url.Parse("http://127.0.0.1:3000/") + remote, _ := url.Parse(config.GogsURL) reverseProxy := httputil.NewSingleHostReverseProxy(remote) reverseProxy.FlushInterval = 1000 * time.Millisecond reverseProxy.ErrorHandler = func(w http.ResponseWriter, req *http.Request, e error) {