chaoslawful/lua-nginx-module — Issue #78: Cache Control within Lua
Author: dakanji
Created: 2012-01-04 16:00:48+00:00
State: open

Hello,

It appears "ngx.exit(status)" output is getting cached by browsers. I.E., when I use the browser "back" or "forward" button to visit a page that had received "ngx.exit(ngx.HTTP_FORBIDDEN)" previously for instance, the page is loaded from the browser's cache.

Is it possible to explicitly send headers, such as cache control headers using ngx-lua or to somehow add a "no-cache" flag ngx.exit?

Note that I don't have the option to set the header outside the ngx-lua directive in this case and that this has to be handled within lua.

Thanks.