From 8d593f615f09916eed7b76343c30179713733d7b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 13 Jun 2018 02:10:57 +0100 Subject: [PATCH] lib/lua/nb.lua --- lib/lua/nb.lua | 2 ++ lib/php/page.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index 0fa62487..b05229a6 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -39,6 +39,8 @@ function nb:ngx_location_tmpl(fheader,ffooter) local file = ngx.var.request_filename; local path = file:gsub('/[^/]+$','') local vars = { + path_file = path, + path_uri = ngx.var.request_uri:gsub('?.*$',''), } if not fheader then fheader = root .. "/tmpl/header.tmpl.html" end diff --git a/lib/php/page.php b/lib/php/page.php index c6bc237d..70395280 100644 --- a/lib/php/page.php +++ b/lib/php/page.php @@ -335,7 +335,8 @@ class Page extends nb { header("Expires: $ts"); header("Last-Modified: $ts"); header("Pragma: no-cache"); - header("Cache-Control: no-cache, must-revalidate"); +# NB 12.06.18 header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0"); } public static function headers_cache($seconds_to_cache=3600) { -- 2.47.3