修复跨域问题

master
a7458969 2020-03-03 20:45:39 +08:00
parent d6ec44d4ef
commit 4c3059ef80
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func InitLogs() {
}
func CORSMiddleware(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
c.Writer.Header().Set("Access-Control-Allow-Origin", "http://localhost:8080")
c.Writer.Header().Set("Access-Control-Allow-Origin", "http://localhost:8080,https://https://www.testingcloud.club/,https://https://testingcloud.club/")
c.Writer.Header().Set("Access-Control-Max-Age", "86400")
c.Writer.Header().Set("Access-Control-Allow-Headers",
"X-Requested-With," +