Refactor auth code

This commit is contained in:
Viacheslav Evseev
2024-02-22 01:50:03 +03:00
parent af14dbbeb8
commit c3f89042f9
11 changed files with 68 additions and 98 deletions

View File

@@ -3,10 +3,11 @@ package template
import (
"crypto/md5"
"fmt"
"github.com/gin-gonic/gin"
)
func RouteWebPages(route *gin.RouterGroup) {
func RouteWebPages(route gin.IRouter) {
route.GET("/", func(c *gin.Context) {
etag := fmt.Sprintf("%x", md5.Sum(Indexhtml))
c.Header("Cache-Control", "public, max-age=31536000")