From 7b80b5ddebe63988c08aacdaed717e6bda85f955 Mon Sep 17 00:00:00 2001 From: yequari Date: Sun, 30 Jul 2023 01:18:37 -0700 Subject: [PATCH] fix cleanUrl to add http:// prefix --- cmd/web/helpers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/web/helpers.go b/cmd/web/helpers.go index 8d38d5f..96af52d 100644 --- a/cmd/web/helpers.go +++ b/cmd/web/helpers.go @@ -28,6 +28,7 @@ func (app *application) cleanUrl(url string) string { s := strings.TrimPrefix(url, "http://") s = strings.TrimPrefix(s, "https://") s = path.Base(path.Clean(s)) + s = "http://" + s return s }