mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-14 15:40:24 +08:00
CORS默认允许的请求方法增加PATCH
This commit is contained in:
@@ -1743,7 +1743,7 @@ func (this *HTTPRequest) processResponseHeaders(responseHeader http.Header, stat
|
|||||||
|
|
||||||
// Allow-Methods
|
// Allow-Methods
|
||||||
if len(corsConfig.AllowMethods) == 0 {
|
if len(corsConfig.AllowMethods) == 0 {
|
||||||
responseHeader.Set("Access-Control-Allow-Methods", "PUT, GET, POST, DELETE, HEAD, OPTIONS")
|
responseHeader.Set("Access-Control-Allow-Methods", "PUT, GET, POST, DELETE, HEAD, OPTIONS, PATCH")
|
||||||
} else {
|
} else {
|
||||||
responseHeader.Set("Access-Control-Allow-Methods", strings.Join(corsConfig.AllowMethods, ", "))
|
responseHeader.Set("Access-Control-Allow-Methods", strings.Join(corsConfig.AllowMethods, ", "))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user