Lua: ngx.location.capture / limit proxy_cache individual file size

Hi
Is it possible to do a version of ngx.location.capture that only does a
HEAD request rather than GET?
I’m only interested in the headers returned, the body would make what
I’m trying to do pointless :frowning:

Also if anyone has another method/idea of how to do this:
I want to limit requests for files of size greater than 512000 bytes
using proxy_cache and actively deny and not cache them
I tried some stuff with ‘if’ but it’s evaluated before the
upstream-content-length is set :frowning:

On Fri, May 20, 2011 at 2:15 AM, Richard K.
[email protected] wrote:

Is it possible to do a version of ngx.location.capture that only does a HEAD
request rather than GET?

Please try

ngx.location.capture("/some-location", { method = ngx.HTTP_HEAD })

If it does not work, please consider file a bug ticket on GitHub:

https://github.com/chaoslawful/lua-nginx-module/issues

Im only interested in the headers returned, the body would make what Im
trying to do pointless L

nod

Best,
-agentzh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs