mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Add header Access-Control-Max-Age for OPTIONS requests https://github.com/siyuan-note/siyuan/pull/9257
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user