Skip to content

Commit

Permalink
fix: double slash
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotiaWang committed Feb 28, 2024
1 parent f9f6507 commit a0dfc50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0dfc50

Please sign in to comment.