Search in sources :

Example 1 with OutboundPassportStampingFilter

use of com.netflix.zuul.filters.passport.OutboundPassportStampingFilter in project zuul by Netflix.

the class BaseZuulChannelInitializer method addZuulFilterChainHandler.

protected void addZuulFilterChainHandler(final ChannelPipeline pipeline) {
    final ZuulFilter<HttpResponseMessage, HttpResponseMessage>[] responseFilters = getFilters(new OutboundPassportStampingFilter(FILTERS_OUTBOUND_START), new OutboundPassportStampingFilter(FILTERS_OUTBOUND_END));
    // response filter chain
    final ZuulFilterChainRunner<HttpResponseMessage> responseFilterChain = getFilterChainRunner(responseFilters, filterUsageNotifier);
    // endpoint | response filter chain
    final FilterRunner<HttpRequestMessage, HttpResponseMessage> endPoint = getEndpointRunner(responseFilterChain, filterUsageNotifier, filterLoader);
    final ZuulFilter<HttpRequestMessage, HttpRequestMessage>[] requestFilters = getFilters(new InboundPassportStampingFilter(FILTERS_INBOUND_START), new InboundPassportStampingFilter(FILTERS_INBOUND_END));
    // request filter chain | end point | response filter chain
    final ZuulFilterChainRunner<HttpRequestMessage> requestFilterChain = getFilterChainRunner(requestFilters, filterUsageNotifier, endPoint);
    pipeline.addLast(new ZuulFilterChainHandler(requestFilterChain, responseFilterChain));
}
Also used : OutboundPassportStampingFilter(com.netflix.zuul.filters.passport.OutboundPassportStampingFilter) HttpResponseMessage(com.netflix.zuul.message.http.HttpResponseMessage) HttpRequestMessage(com.netflix.zuul.message.http.HttpRequestMessage) ZuulFilterChainHandler(com.netflix.zuul.netty.filter.ZuulFilterChainHandler) ZuulFilter(com.netflix.zuul.filters.ZuulFilter) InboundPassportStampingFilter(com.netflix.zuul.filters.passport.InboundPassportStampingFilter)

Aggregations

ZuulFilter (com.netflix.zuul.filters.ZuulFilter)1 InboundPassportStampingFilter (com.netflix.zuul.filters.passport.InboundPassportStampingFilter)1 OutboundPassportStampingFilter (com.netflix.zuul.filters.passport.OutboundPassportStampingFilter)1 HttpRequestMessage (com.netflix.zuul.message.http.HttpRequestMessage)1 HttpResponseMessage (com.netflix.zuul.message.http.HttpResponseMessage)1 ZuulFilterChainHandler (com.netflix.zuul.netty.filter.ZuulFilterChainHandler)1