Add activation-codes and registration. Added tooltips. Added player-score-cache-display in mainpage.

This commit is contained in:
MaxJa4
2024-01-17 12:21:48 +01:00
parent 2a8c53ab56
commit 7e3c02e37e
18 changed files with 234 additions and 36 deletions

View File

@@ -20,6 +20,10 @@ func main() {
//gin.SetMode(gin.ReleaseMode) // uncomment upon release
router := gin.New()
err := router.SetTrustedProxies([]string{"127.0.0.1"})
if err != nil {
log.Fatal(err)
}
router.LoadHTMLGlob("templates/**/*")
protected := router.Group("/")
protected.Use(AuthRequired())
@@ -38,6 +42,8 @@ func main() {
router.GET("/login", loginPage)
router.POST("/login", loginPost)
router.GET("/logout", logout)
router.GET("/register", registerPage)
router.POST("/register", registerPost)
protected.GET("/", mainPage)