@bonniernews/local-esi
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -273,2 +273,9 @@ "use strict"; | ||
text = text.replace(/\$set_redirect\(\s*'(.+?)'\s*\)/ig, (_, location) => { | ||
if (shouldWrite()) { | ||
context.res.redirect(location); | ||
} | ||
return ""; | ||
}); | ||
text = text.replace(/\$set_response_code\(\s*(\d{3})\s*\)/ig, (_, responseCode) => { | ||
@@ -281,3 +288,2 @@ if (shouldWrite()) { | ||
text = text.replace(/\$set_response_code\(\s*(\d{3})\s*,\s*(')((.*?)\2\s*\))?/ig, (_, responseCode, _2, _3, content) => { | ||
@@ -284,0 +290,0 @@ if (!shouldWrite()) return ""; |
{ | ||
"name": "@bonniernews/local-esi", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Local Edge Side Includes parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17838
516