private List<String> extractXForwardedValues(final ServerWebExchange exchange) {
        List<String> xForwardedValues = exchange.getRequest().getHeaders()
                .get(X_FORWARDED_FOR);
        if (CollectionUtils.isEmpty(xForwardedValues)) {
            return Collections.emptyList();
        }
        if (xForwardedValues.size() > 1) {
            LOG.warn("Multiple X-Forwarded-For headers found, discarding all");
            return Collections.emptyList();
        }
        List<String> values = Arrays.asList(xForwardedValues.get(0).split(", "));
        if (values.size() == 1 && StringUtils.isNotEmpty(values.get(0))) {
            return Collections.emptyList();
        }
        return values;
    }
Max trusted index forwarded remote address resolver.

@param maxTrustedIndex the max trusted index
@return the forwarded remote address resolver
shenyu-web/src/main/java/org/apache/shenyu/web/forward/ForwardedRemoteAddressResolver.java