Forbid Unauthenticated requests in Spring Cloud Gateway
问题 I have implemented custom pre filter in spring cloud gateway which allows authenticated requests to go through the downstream process. What I want is if the request is unauthenticated then return with response of 401 UNAUTHORIZE status and stop the downstream processing. Can I achieve this spring cloud gateway. Please help. My filter code is below public class ValidUserFilter implements GatewayFilterFactory { @Override public GatewayFilter apply(Object config) { return (exchange, chain) -> {