]> granicus.if.org Git - apache/commitdiff
configuration change.
authorIan Holsman <ianh@apache.org>
Tue, 29 Jan 2002 19:00:45 +0000 (19:00 +0000)
committerIan Holsman <ianh@apache.org>
Tue, 29 Jan 2002 19:00:45 +0000 (19:00 +0000)
allow a '!' directive to stop proxying these requests
eg.

  ProxyPass /services/images/     !
  ProxyPass /services/            http://service-machine/services/

which will stop requests to /services/images/ from being proxied

Submitted by: Jukka Pihl <jukka.pihl@entirem.com>
Reviewed by: Ian Holsman, Graham Legget, Chuck Murcko

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93086 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_proxy.html
modules/proxy/mod_proxy.c

diff --git a/CHANGES b/CHANGES
index 5894466dc4c0d2c5477b80cc8e1a29fe4bd62992..0f2604722536290cef95014b997d4810cd24409e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,6 @@
 Changes with Apache 2.0.31-dev
+  *) New Directive Option for ProxyPass. It now can block a location
+     from being proxied [Jukka Pihl <jukka.pihl@entirem.com>]
 
   *) Don't let the default handler try to serve a raw directory.  At
      best you get gibberish.  Much worse things can happen depending
index df5e1c8d81d8a02eeff8d2967fd92ead5d61762f..616c49917a19afa58f70333fb1c308d42450b8be 100644 (file)
@@ -328,9 +328,10 @@ by another forward proxy.
 <A
  HREF="directive-dict.html#Syntax"
  REL="Help"
-><STRONG>Syntax:</STRONG></A> ProxyPass <EM>path url</EM><br> 
-or: ProxyPass <EM>url</EM> when placed in a &lt;location&gt; directive <em>(Apache 2.0 only)</em>
-<br>
+><STRONG>Syntax:</STRONG></A> ProxyPass <EM>path url</EM><BR> 
+or: ProxyPass <EM>url</EM> when placed in a &lt;location&gt; directive <em>(Apache 2.0 only)</EM><br>
+or: ProxyPass <EM>path !</EM> to exclude a path from being proxied.
+<BR>
 <A
  HREF="directive-dict.html#Default"
  REL="Help"
@@ -370,8 +371,15 @@ will cause a local request for the
 &lt;<SAMP>http://wibble.org/mirror/foo/bar</SAMP>&gt; to be
 internally converted into a proxy request to
 &lt;<SAMP>http://foo.com/bar</SAMP>&gt;.
-
-
+<P>
+The ! directive is usefull in situations where you don't want to reverse-proxy
+a subdirectory. eg.
+<PRE>
+        ProxyPass /mirror/foo http://foo.com
+        ProxyPass /mirror/foo/i !
+</PRE>
+will proxy all requests to /mirror/foo to foo.com EXCEPT requests made to /mirror/foo/i
+</P>
 <HR>
 
 <H2><A NAME="proxypassreverse">ProxyPassReverse</A> directive</H2>
index b82657e128849fb5190e64b09e972462198bb17c..9bb07a859af5370630079a2cef4b406ece11388f 100644 (file)
@@ -188,6 +188,10 @@ static int proxy_trans(request_rec *r)
         len = alias_match(r->uri, ent[i].fake);
            
        if (len > 0) {
+           if ((ent[i].real[0] == '!' ) & ( ent[i].real[1] == 0 )) {
+               return DECLINED;
+           }
+
            r->filename = apr_pstrcat(r->pool, "proxy:", ent[i].real,
                                  (r->uri + len ), NULL);
            r->handler = "proxy-server";