Skip to content

Commit 8f031bf

Browse files
committed
feat(): fix cors
1 parent 14dc377 commit 8f031bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func CORSMiddleware() gin.HandlerFunc {
5959
return func(c *gin.Context) {
6060
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
6161
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
62-
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")
62+
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Sort, sort, X-API-KEY, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
6363
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, HEAD")
6464

6565
if c.Request.Method == "OPTIONS" {

0 commit comments

Comments
 (0)