@Override
    protected Mono<Void> doFilter(final ServerWebExchange exchange) {
        String localKey = exchange.getRequest().getHeaders().getFirst(Constants.LOCAL_KEY);
        if (Objects.isNull(sha512Key) || !sha512Key.equalsIgnoreCase(DigestUtils.sha512Hex(localKey)) || Objects.isNull(localKey)) {
            return Mono.error(new ResponseStatusException(HttpStatus.FORBIDDEN, "The key is not correct."));
        }
        return dispatcherHandler.handle(exchange);
    }
Instantiates a new Local dispatcher filter.

@param dispatcherHandler the dispatcher handler
@param sha512Key the sha512 key
shenyu-web/src/main/java/org/apache/shenyu/web/filter/LocalDispatcherFilter.java