Modify: parameters in headers should be URIEncoded

This commit is contained in:
HFO4
2019-11-25 21:12:28 +08:00
parent 28df5ca833
commit 451bdb4ee1
6 changed files with 53 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ func InitRouter() *gin.Engine {
r.Use(cors.New(cors.Config{
AllowOrigins: []string{"http://localhost:3000"},
AllowMethods: []string{"PUT", "POST", "GET", "OPTIONS"},
AllowHeaders: []string{"X-PINGOTHER", "Content-Type"},
AllowHeaders: []string{"Content-Length", "Content-Type", "X-Path", "X-FileName"},
AllowCredentials: true,
}))