@@ -0,0 +1,929 @@
+package microservices.demo;%0A%0Aimport java.util.Map;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport com.netflix.zuul.ZuulFilter;%0Aimport com.netflix.zuul.context.RequestContext;%0A%0A@Component%0Apublic class RequestHeaderLoggingFilter extends ZuulFilter %7B%0A%09private static Logger logger = LoggerFactory.getLogger(RequestHeaderLoggingFilter.class);%0A%0A%09@Override%0A%09public String filterType() %7B%0A%09%09return %22pre%22;%0A%09%7D%0A%0A%09@Override%0A%09public int filterOrder() %7B%0A%09%09return 99;%0A%09%7D%0A%0A%09@Override%0A%09public boolean shouldFilter() %7B%0A%09%09return true;%0A%09%7D%0A%0A%09@Override%0A%09public Object run() %7B%0A%09%09RequestContext ctx = RequestContext.getCurrentContext();%0A%09%09Map%3CString, String%3E headers = ctx.getZuulRequestHeaders();%0A%0A%09%09logger.info(%22Request headers:%22);%0A%09%09if (headers != null) %7B%0A%09%09%09headers.forEach((key, value) -%3E %7B%0A%09%09%09%09logger.info(%22Header%5B%22 + key + %22%5D=%5B%22 + value + %22%5D%22);%0A%09%09%09%7D);%0A%09%09%7D%0A%0A%09%09return null;%0A%09%7D%0A%0A%7D%0A

Add demo Zuul filter