-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Filters
mhawthorne edited this page Mar 26, 2013
·
14 revisions
Filters must extend com.netflix.zuul.groovy.ProxyFilter and implement the following methods:
String filterType();
int filterOrder();
boolean shouldFilter();
Object run();A Filter's type is a String which can be any value that you desire. There are 2 uses for this:
-
Zuul's primary request lifecycle consists of "pre", "proxy", and "post" phases, in that order. All filters with these types are run for every request.
-
Filters of any type can be explicitly run using the method
GroovyProcessor.runFilters(String type).
As stated above, Filters are only run if shouldRun() returns true, and are run in the order specified by filterOrder()
A Netflix Original Production
Tech Blog | Twitter @NetflixOSS | Jobs
-
Zuul 3.x
-
Zuul 2.x
-
Zuul 1.x