From 4436c5af813e417272b41b50fc26d115a73a7926 Mon Sep 17 00:00:00 2001 From: scott Date: Sat, 24 Oct 2026 05:27:17 -0400 Subject: [PATCH] =?UTF-8?q?fix(openapi):=20/openapi/call=20=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E6=8E=A5=E5=8F=97=20OPTIONS=E3=80=81TRACE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OPTIONS 已由 ApiAuthFilter 只应答 CORS,TRACE 默认被容器拒绝,两者本就无法正常转发; 去掉映射作为兜底,避免 OPTIONS 再次成为绕过认证的转发入口。保留 HEAD。 Co-Authored-By: Claude Opus 5.5 --- .../jeecg/modules/openapi/controller/OpenApiController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/controller/OpenApiController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/controller/OpenApiController.java index 86f41476f..7c67225ca 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/controller/OpenApiController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/controller/OpenApiController.java @@ -158,7 +158,9 @@ public class OpenApiController extends JeecgController * @param path * @return */ - @RequestMapping(value = "/call/{path}", method = {RequestMethod.GET,RequestMethod.POST,RequestMethod.DELETE,RequestMethod.PUT,RequestMethod.PATCH,RequestMethod.HEAD,RequestMethod.OPTIONS,RequestMethod.TRACE}) + //update-begin---author:scott ---date:20261024 for:/call 不再接受 OPTIONS、TRACE,OPTIONS 不能再作为转发入口绕过认证----------- + @RequestMapping(value = "/call/{path}", method = {RequestMethod.GET,RequestMethod.POST,RequestMethod.DELETE,RequestMethod.PUT,RequestMethod.PATCH,RequestMethod.HEAD}) + //update-end---author:scott ---date:20261024 for:/call 不再接受 OPTIONS、TRACE----------- public Result call(@PathVariable String path, @RequestBody(required = false) String json, HttpServletRequest request) { OpenApi openApi = service.findByPath(path); if (Objects.isNull(openApi)) {