proxy_cache when 'Authorization' HTTP header presents.

Kuramoto Eiji ek at kuramoto.org
Thu Aug 20 06:36:40 MSD 2009


Hello,

 On Tue, 18 Aug 2009 16:25:50 +0400
    Maxim Dounin wrote:
 } >  } This effectively switches off cache for requests with 
 } >  } authorization.  The same may be done via configs.
 } > 
 } > How can I do via configs?
 } 
 } Try something like this:
 } 
 }     location @fallback {
 }         recursive_error_pages on;
 }         error_page 405 = @nocache;
 } 
 }         if ($http_authorization) {
 }             return 405;
 }         }
 } 
 }         proxy_pass ...
 }         proxy_cache ...
 }     }
 } 
 }     location @nocache {
 }         # no proxy_cache here
 }         proxy_pass ...
 }     }

I'll try this config later. Thank you.

- Kuramoto Eiji





More information about the nginx mailing list