mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 Add header Access-Control-Max-Age for OPTIONS requests https://github.com/siyuan-note/siyuan/pull/9257
This commit is contained in:
parent
ebd1dce81c
commit
ca5c3fca93
1 changed files with 1 additions and 1 deletions
|
|
@ -530,7 +530,7 @@ func corsMiddleware() gin.HandlerFunc {
|
||||||
c.Header("Access-Control-Allow-Private-Network", "true")
|
c.Header("Access-Control-Allow-Private-Network", "true")
|
||||||
|
|
||||||
if c.Request.Method == "OPTIONS" {
|
if c.Request.Method == "OPTIONS" {
|
||||||
c.Header("Access-Control-Max-Age", 600)
|
c.Header("Access-Control-Max-Age", "600")
|
||||||
c.AbortWithStatus(204)
|
c.AbortWithStatus(204)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue