From b9adf8ce89d4bc1453d13d365bdee678a62406b1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 7 Aug 2024 01:45:08 +0200 Subject: Add a comment --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index b987ef2..0597e83 100644 --- a/main.go +++ b/main.go @@ -42,6 +42,7 @@ func main() { func finalHandler(w http.ResponseWriter, r *http.Request) { p := r.Context().Value(middleware.PrinterKey).(i18n.Printer) + /* Strip trailing slash from the URL */ path := r.URL.Path if path != "/" && path[len(path)-1] == '/' { path = path[:len(path)-1] -- cgit v1.2.3