handle trailing slash

This commit is contained in:
Akbar Rahman 2024-02-29 15:36:06 +00:00
parent 37bb2a7f33
commit 11ecfe7cb0
Signed by: alvierahman90
GPG Key ID: 6217899F07CA2BDF

View File

@ -42,6 +42,7 @@ var INDEX_GET_REDIRECT = "http://alv.cx"
func main() { func main() {
r := mux.NewRouter() r := mux.NewRouter()
r.HandleFunc("/{shortlink}", shortlinkHandler) r.HandleFunc("/{shortlink}", shortlinkHandler)
r.HandleFunc("/{shortlink}/", shortlinkHandler)
r.HandleFunc("/", indexHandler) r.HandleFunc("/", indexHandler)
listenAddress := "0.0.0.0:80" listenAddress := "0.0.0.0:80"