diff --git a/background/apps.json b/background/apps.json index 41b42e6..fe51488 100644 --- a/background/apps.json +++ b/background/apps.json @@ -1,3 +1 @@ -[ - -] +[] diff --git a/background/main.go b/background/main.go index 3af2a82..6e67c8f 100644 --- a/background/main.go +++ b/background/main.go @@ -113,11 +113,11 @@ func main() { // 添加CORS中间件 r.Use(func(c *gin.Context) { c.Writer.Header().Set("Access-Control-Allow-Origin", "*") - c.Writer.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS") + c.Writer.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS") c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization") if c.Request.Method == "OPTIONS" { - c.AbortWithStatus(204) + c.AbortWithStatus(200) return }