From b9a1a0b4842786fa6aa1f2a1b6c319abfdaf69bb Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 19 May 2023 15:41:47 +0800 Subject: [PATCH] =?UTF-8?q?CORS=E9=BB=98=E8=AE=A4=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E7=9A=84=E8=AF=B7=E6=B1=82=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?PATCH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nodes/http_request.go b/internal/nodes/http_request.go index cc4886b..f52075a 100644 --- a/internal/nodes/http_request.go +++ b/internal/nodes/http_request.go @@ -1743,7 +1743,7 @@ func (this *HTTPRequest) processResponseHeaders(responseHeader http.Header, stat // Allow-Methods 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 { responseHeader.Set("Access-Control-Allow-Methods", strings.Join(corsConfig.AllowMethods, ", ")) }