From d0cfff2e0e216f69ae2c74bbed2bb27d6bcd323c Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 10 May 2018 04:04:48 +0100 Subject: [PATCH] lib/lua/nb.lua --- lib/lua/nb.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index dc515c6d..a046e23d 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -24,7 +24,6 @@ end function nb:ngx_location_md(fheader,ffooter) -- See https://github.com/bungle/lua-resty-template -- location ~ \.(md|html)$ { --- default_type text/html; -- content_by_lua 'package.path = ngx.var.NB_ROOT .. "/lib/lua/?.lua;" .. package.path local nb = require("nb") nb:ngx_location_md()'; -- } if not fheader then fheader = ngx.var.document_root .. "/header.html" end @@ -92,6 +91,7 @@ function nb:ngx_location_md(fheader,ffooter) local header = self:readall(fheader) local footer = nb:readall(ffooter) content = header .. content .. footer + ngx.header["Content-type"] = "text/html" end template.render(content,vars) -- 2.47.3