Skip to content

Commit

Permalink
🎨 Add header Access-Control-Max-Age for OPTIONS requests #9257
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Sep 25, 2023
1 parent ebd1dce commit ca5c3fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func corsMiddleware() gin.HandlerFunc {
c.Header("Access-Control-Allow-Private-Network", "true")

if c.Request.Method == "OPTIONS" {
c.Header("Access-Control-Max-Age", 600)
c.Header("Access-Control-Max-Age", "600")
c.AbortWithStatus(204)
return
}
Expand Down

0 comments on commit ca5c3fc

Please sign in to comment.