handle trailing slash
This commit is contained in:
parent
37bb2a7f33
commit
11ecfe7cb0
1
main.go
1
main.go
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user