diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-04 22:42:54 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-06 21:33:58 +0300 |
commit | d43ffcfaa959d1f3875c61521c231251305b98db (patch) | |
tree | 2b09f508e679753e4f8f3cdfa03faf360c7031ae | |
parent | 71ec12236998fb58caa11d535ea269d556b419c2 (diff) | |
download | aconf-d43ffcfaa959d1f3875c61521c231251305b98db.tar.bz2 aconf-d43ffcfaa959d1f3875c61521c231251305b98db.tar.xz |
server: prevent caching
-rw-r--r-- | server.lua | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,7 @@ local aconf = require('aconf') local mbin = aconf.model.binary local mnode = aconf.model.node local isinstance = aconf.object.isinstance +local update = require('aconf.util').update local json = require('cjson') local posix = require('posix') @@ -24,6 +25,14 @@ local sessions = {} return function(env) local function wrap(code, headers, res, encode) if not headers then headers = {} end + update( + headers, + { + ['Cache-Control']='no-cache, no-store, must-revalidate', + Pragma='no-cache', + Expires='0' + } + ) if res then local ctype |