changeset 5:1d1236b72e5e

Added prefix stripping. Should now work.
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 13 Jun 2018 11:41:24 +0200
parents ac5529cb20ba
children 000adddf74c8
files cmd/tokenserver/main.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/tokenserver/main.go	Wed Jun 13 11:20:49 2018 +0200
+++ b/cmd/tokenserver/main.go	Wed Jun 13 11:41:24 2018 +0200
@@ -50,7 +50,7 @@
 	mux.HandleFunc("/", index)
 	mux.HandleFunc("/token", token)
 	api := http.NewServeMux()
-	api.Handle("/api", mux)
+	api.Handle("/api/", http.StripPrefix("/api", mux))
 
 	addr := fmt.Sprintf("%s:%d", *host, *port)
 	log.Fatalln(http.ListenAndServe(addr, api))