dkforest

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

commit c027082be255d529bb4bcb42073885b8bf9a8577
parent b52acb14a29d2778de8360db4d431a5762a268da
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 21 Jun 2023 21:53:29 -0700

optimize code

Diffstat:
Mpkg/web/web.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/web/web.go b/pkg/web/web.go @@ -353,7 +353,7 @@ func getTorServer(db *database.DkfDB) *echo.Echo { e.Debug = true e.Any("*", func(c echo.Context) error { host := c.Request().Host - hostParts := strings.Split(host, ".") + hostParts := strings.SplitN(host, ".", 2) if hostParts[0] == "git" { remote, _ := url.Parse(config.GogsURL) reverseProxy := httputil.NewSingleHostReverseProxy(remote)