🎨 尝试解决潜在的剪藏扩展请求跨域问题 https://github.com/siyuan-note/siyuan/issues/6907
This commit is contained in:
parent
192679eedd
commit
e06d774da0
1 changed files with 1 additions and 0 deletions
|
@ -474,6 +474,7 @@ func corsMiddleware() gin.HandlerFunc {
|
|||
c.Header("Access-Control-Allow-Credentials", "true")
|
||||
c.Header("Access-Control-Allow-Headers", "origin, Content-Length, Content-Type, Authorization")
|
||||
c.Header("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS")
|
||||
c.Header("Access-Control-Allow-Private-Network", "true")
|
||||
|
||||
if c.Request.Method == "OPTIONS" {
|
||||
c.AbortWithStatus(204)
|
||||
|
|
Loading…
Add table
Reference in a new issue