Pre Merge pull request !202 from 光速蜗牛/N/A

This commit is contained in:
光速蜗牛 2022-06-13 12:48:55 +00:00 committed by Gitee
commit 1053103760
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class XssFilter implements GlobalFilter, Ordered
ServerHttpRequest request = exchange.getRequest();
// GET DELETE 不过滤
HttpMethod method = request.getMethod();
if (method == null || method.matches("GET") || method.matches("DELETE"))
if (method == null || method == HttpMethod.GET || method == HttpMethod.DELETE)
{
return chain.filter(exchange);
}