This commit is contained in:
nikk gitanes
2023-02-18 23:23:11 +03:00
parent ec4deb8afe
commit 7822157ff2
22 changed files with 62 additions and 69 deletions

View File

@@ -2,9 +2,10 @@ package web
import (
"net"
"server/rutor"
"sort"
"server/rutor"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/location"
"github.com/gin-gonic/gin"
@@ -42,11 +43,11 @@ func Start(port string) {
gin.SetMode(gin.ReleaseMode)
//corsCfg := cors.DefaultConfig()
//corsCfg.AllowAllOrigins = true
//corsCfg.AllowHeaders = []string{"*"}
//corsCfg.AllowMethods = []string{"*"}
//corsCfg.AllowPrivateNetwork = true
// corsCfg := cors.DefaultConfig()
// corsCfg.AllowAllOrigins = true
// corsCfg.AllowHeaders = []string{"*"}
// corsCfg.AllowMethods = []string{"*"}
// corsCfg.AllowPrivateNetwork = true
corsCfg := cors.DefaultConfig()
corsCfg.AllowAllOrigins = true
corsCfg.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "X-Requested-With", "Accept", "Authorization"}