From f74b7ab078c9a485daed4bf9e0c71ff041f7243c Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 7 Dec 2016 16:59:04 +0100 Subject: [PATCH] Remove .html --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 96b10d9..907185c 100644 --- a/main.go +++ b/main.go @@ -12,12 +12,12 @@ func main() { router.LoadHTMLGlob("./templates/*") router.Static("/static", "./static") - router.GET("/login.html", login) + router.GET("/login", login) api := router.Group("/api/v1") { api.GET("/logout", logout) api.GET("/login", func(c *gin.Context) { - c.Redirect(http.StatusPermanentRedirect, "/login.html") + c.Redirect(http.StatusPermanentRedirect, "/login") }) api.POST("/login", loginPost) @@ -37,14 +37,13 @@ func main() { } } - router.Run(":1323") } func restricted(c *gin.Context) { claims, ok := verifyLogin(c) if !ok { - c.Redirect(http.StatusTemporaryRedirect, "/login.html") + c.Redirect(http.StatusTemporaryRedirect, "/login") return }