| 11/38 |
© 2004 by Philippe "BooK" Bruhat.
|
A simple example:
# $filter is a filter object $proxy->push_filter( response => $filter, # only responses host => 'example.com', # coming from example.com mime => 'text/html', # as HTML file );
Naturaly, the ordering of filters is important, since each filter receives data chunks from its predecessor, possibly modifies them and passes them on to the next filter in the chain.
# first, require authentication for everything $proxy->push_filter( request => $proxy_auth, # 407 unless user is authenticated ); # then modify example.com $proxy->push_filter( response => $filter, # only responses host => 'example.com', # coming from example.com mime => 'text/html', # as HTML file );