Aias00 opened a new issue, #6577: URL: https://github.com/apache/shenyu/issues/6577
## Description When `allowedOrigin.originRegex` is configured and the origin is not in the explicit allow-set, `allowCors = Pattern.matches(originRegex.trim(), origin)` recompiles the regex on every request on the WebFilter chain (Netty event loop). ## Location ``` shenyu-web/.../filter/CrossFilter.java:94 ``` ## Impact Per-CORS-request regex compile when the regex allow-list path is used. Minor at low RPS, measurable for high-RPS public APIs relying on regex origins. ## Suggested fix Compile `originRegex` once at config-load time into a `java.util.regex.Pattern` field; call `.matcher(origin).matches()`. ## Related existing issue(s) None _Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
