Skip to content

Commit

Permalink
Changed Some things
Browse files Browse the repository at this point in the history
  • Loading branch information
JarcauCristian committed Mar 3, 2024
1 parent 8b62c72 commit 2f17932
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func main() {
}
gin.SetMode(gin.ReleaseMode)
r := gin.Default()
r.MaxMultipartMemory = 100 << 20

r.Use(CORSMiddleware())

Expand Down Expand Up @@ -622,7 +621,7 @@ func CORSMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Writer.Header().Set("Access-Control-Allow-Headers", "*")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, DELETE")

if c.Request.Method == "OPTIONS" {
Expand Down

0 comments on commit 2f17932

Please sign in to comment.