fix(openapi): /openapi/call 不再接受 OPTIONS、TRACE

OPTIONS 已由 ApiAuthFilter 只应答 CORS,TRACE 默认被容器拒绝,两者本就无法正常转发;
去掉映射作为兜底,避免 OPTIONS 再次成为绕过认证的转发入口。保留 HEAD。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
scott 2026-10-24 05:27:17 -04:00
parent ff9b67f4ba
commit 4436c5af81

View File

@ -158,7 +158,9 @@ public class OpenApiController extends JeecgController<OpenApi, OpenApiService>
* @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)) {