add scheme to list

This commit is contained in:
YouROK
2021-04-27 11:38:40 +03:00
parent 94b092b7d7
commit 1ffb868fcb
4 changed files with 23 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ import (
"net"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/location"
"github.com/gin-gonic/gin"
"server/log"
@@ -38,7 +39,7 @@ func Start(port string) {
corsCfg.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "X-Requested-With", "Accept", "Authorization"}
route := gin.New()
route.Use(log.WebLogger(), blocker.Blocker(), gin.Recovery(), cors.New(corsCfg))
route.Use(log.WebLogger(), blocker.Blocker(), gin.Recovery(), cors.New(corsCfg), location.Default())
route.GET("/echo", echo)