add AllowPrivateNetwork cors header

This commit is contained in:
nikk gitanes
2024-05-27 11:20:54 +03:00
parent d31524e749
commit 0a777b6f84

View File

@@ -64,9 +64,9 @@ func Start() {
// corsCfg.AllowAllOrigins = true // corsCfg.AllowAllOrigins = true
// corsCfg.AllowHeaders = []string{"*"} // corsCfg.AllowHeaders = []string{"*"}
// corsCfg.AllowMethods = []string{"*"} // corsCfg.AllowMethods = []string{"*"}
// corsCfg.AllowPrivateNetwork = true
corsCfg := cors.DefaultConfig() corsCfg := cors.DefaultConfig()
corsCfg.AllowAllOrigins = true corsCfg.AllowAllOrigins = true
corsCfg.AllowPrivateNetwork = true
corsCfg.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "X-Requested-With", "Accept", "Authorization"} corsCfg.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "X-Requested-With", "Accept", "Authorization"}
route := gin.New() route := gin.New()