@@ -4,6 +4,11 @@ CHANGELOG
Branch 3.X.X
------------------------------------------------------
+### 3.1.0 ###
+
+* Added: exposed `express.js` response object within `filter()` callback
### 3.0.0 ###
* Refactored the whole codebase
@@ -45,7 +45,7 @@ async function bootstrap(){
footer: 'Hello <strong>World</strong>',
pagetitle: 'we are sorry - an internal error encountered',
},
- filter: function(data){
+ filter: function(data, req, res){
// remove footer
//data.footer = null;
return data;
@@ -14,7 +14,7 @@ async function bootstrap(){
+ filter: function(data, ctx){
@@ -27,7 +27,7 @@ async function createDispatcher(options={}){
// standard http-error-pages
html: function(){
res.type('.html');
- res.send(_render(resources.template, resources.stylesheet, opt.filter(templateVars, req)))
+ res.send(_render(resources.template, resources.stylesheet, opt.filter(templateVars, req, res)))
// json
@@ -1,6 +1,6 @@
{
"name": "http-error-pages",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "Simple HTTP Error Pages. standalone + static + koa + express",
"engines": {
"node": ">=7.6"