diff options
author | a <a@a.com> | 2025-08-11 05:09:55 +0000 |
---|---|---|
committer | a <a@a.com> | 2025-08-11 05:09:55 +0000 |
commit | 3a78df7d613c61bf74a43ec023af23b47c9b5635 (patch) | |
tree | ef323247d381405804db61507449ad9592d5518b /main_server.go | |
parent | 445d90bd38e600617933124a1579579f6b905303 (diff) |
Diffstat (limited to 'main_server.go')
-rw-r--r-- | main_server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main_server.go b/main_server.go index 00d3938..a17d788 100644 --- a/main_server.go +++ b/main_server.go @@ -50,13 +50,13 @@ func gen_hash(url string) string{ } func correct_url(url string) string { - if(len(url) <= 7) { - return "https://" + url; + if(url[:7] == "https:/") { + return "https://" + url[7:]; } - if(url[:8] != "https://") { - return "https://" + url; + if(url[:6] == "http:/") { + return "http://" + url[:6]; } - return url; + return "https://" + url; } func add_url(url string) string{ |