Skip to content

Commit

Permalink
fix: add DELETE to cors
Browse files Browse the repository at this point in the history
  • Loading branch information
kastnerorz committed Apr 15, 2020
1 parent e4fd249 commit e84fc90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/middlewares/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func CorsMiddleware() gin.HandlerFunc {
return cors.New(cors.Config{
//AllowOrigins: []string{"http://localhost:3000", "http://192.168.50.196:3000"},
AllowMethods: []string{"PUT", "PATCH", "POST", "GET", "OPTIONS"},
AllowMethods: []string{"PUT", "PATCH", "POST", "GET", "OPTIONS", "DELETE"},
AllowHeaders: []string{"Origin", "Content-Type", "Authorization"},
ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true,
Expand Down

0 comments on commit e84fc90

Please sign in to comment.