logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problem to remove filter with FilterChain in mod_filter
Author
fleg



Joined: 25 Feb 2021
Posts: 1
Location: Paris

PostPosted: Thu 25 Feb '21 11:40    Post subject: Problem to remove filter with FilterChain in mod_filter Reply with quote

Hi,
I have an apache reverse proxy. I was using SetOutputFilter but I want to move to mod_filter.
Thus I declare a filter for proxy-html in the <VirtualHost> :
Code:

FilterDeclare proxyhtml
FilterProvider proxyhtml proxy-html  "%{CONTENT_TYPE} =~ m|^text/html|"
FilterChain +proxyhtml

So far so good. But for one of my site (grafana), proxy-html "corrects" the pages and remove some parts of the code then grafana fails. Thus I want for this site to remove the filter (but only for this site).
I tried :

Code:

<Location "/grafana/">
        FilterChain -proxyhtml
</Location>

but it doesn't work.
But if I do a :
Code:

<Location "/grafana/">
        FilterChain !
</Location>

it works ! What am I doing wrong ?
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 348
Location: UK

PostPosted: Thu 25 Feb '21 22:30    Post subject: Reply with quote

I can't explain why you can remove the entire filter chain, but not one filter. As an alternative, your could try putting the /grafana/ qualifier in your FilterProvider expression, viz.
Code:
FilterDeclare proxyhtml
FilterProvider proxyhtml proxy-html  "%{CONTENT_TYPE} =~ m|^text/html| && %{REQUEST_URI} !~ m|^/grafana/|"
FilterChain +proxyhtml
Back to top


Reply to topic   Topic: Problem to remove filter with FilterChain in mod_filter View previous topic :: View next topic
Post new topic   Forum Index -> Apache