From ec1046d9099e96f8a339efae11833639d6302993 Mon Sep 17 00:00:00 2001 From: Cylinder Lee Date: Wed, 25 Sep 2024 09:32:25 +0800 Subject: [PATCH] Update cors.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对路由中http方法的配置导致cros插件生效后浏览器无法按照预期工作的说明 --- docs/zh/latest/plugins/cors.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/zh/latest/plugins/cors.md b/docs/zh/latest/plugins/cors.md index 9367c2756eea..2198a21a8bb3 100644 --- a/docs/zh/latest/plugins/cors.md +++ b/docs/zh/latest/plugins/cors.md @@ -125,3 +125,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H "X-API-KEY: $admin_key" -X P } }' ``` + +## 备注 + +基于现在浏览器工作模式,配置`cors` 插件后需要检查对应路由配置中`HTTP方法`是否开启了`OPTIONS`。如果未开启`OPTIONS`方法,浏览器将无法按照`cors` 插件的配置正常工作。