From 7171774a34b5aaabce395f9fd7c29e58eecfc5ef Mon Sep 17 00:00:00 2001 From: crapStone Date: Wed, 11 Jan 2023 00:01:09 +0100 Subject: [PATCH] fix wrong redirect on custom domain with path --- server/handler/handler_custom_domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/handler/handler_custom_domain.go b/server/handler/handler_custom_domain.go index 2f98085..a541b74 100644 --- a/server/handler/handler_custom_domain.go +++ b/server/handler/handler_custom_domain.go @@ -54,7 +54,7 @@ func handleCustomDomain(log zerolog.Logger, ctx *context.Context, giteaClient *g // only redirect if the target is also a codeberg page! targetOwner, _, _ = dns.GetTargetFromDNS(strings.SplitN(canonicalDomain, "/", 2)[0], mainDomainSuffix, dnsLookupCache) if targetOwner != "" { - ctx.Redirect("https://"+canonicalDomain+targetOpt.TargetPath, http.StatusTemporaryRedirect) + ctx.Redirect("https://"+canonicalDomain+"/"+targetOpt.TargetPath, http.StatusTemporaryRedirect) return }