From a0dfc50b614339822c4845afc06c3bdb697f530e Mon Sep 17 00:00:00 2001 From: AnotiaWang Date: Wed, 28 Feb 2024 19:27:56 +0800 Subject: [PATCH] fix: double slash --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 27aa771..a5f6a68 100644 --- a/main.go +++ b/main.go @@ -88,7 +88,9 @@ func handler(c *gin.Context, u string) { if !strings.HasPrefix(u, "http") { u = "https://" + u } - // u = strings.Replace(u, "s:/", "s://", 1) // Fix for double slash issue + if !strings.HasPrefix(u, "https://") && strings.HasPrefix(u, "https:/") { + u = strings.Replace(u, "https:/", "https://", 1) + } passBy := false match, _ := checkURL(u)