commit f0d35530b7e1bc784e7806a1e289bb63fc249295
parent 4323df1f1a60b6942891d7be2c37641c99b10d73
Author: Demonstrandum <moi@knutsen.co>
Date: Sun, 7 Feb 2021 17:59:54 +0000
Redirect /static to /static/
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/main.go b/main.go
@@ -117,6 +117,9 @@ func main() {
}
s.Static("/static", "static")
+ s.Handle("/static", func(c gig.Context) error {
+ return c.NoContent(gig.StatusRedirectPermanent, "/static/")
+ })
s.Handle("/", defaultView("index"))
user := s.Group("/~:name")