This commit is contained in:
@@ -71,6 +71,7 @@ const { obj2str, log } = require("../lib/utils")
|
||||
html = "<!-- NO SSR RENDERING -->"
|
||||
} else if (pNotfound) {
|
||||
status = 404
|
||||
console.log("IS 404")
|
||||
html = "404 NOT FOUND"
|
||||
} else {
|
||||
// try rendering, if error output plain html
|
||||
@@ -137,6 +138,7 @@ const { obj2str, log } = require("../lib/utils")
|
||||
// @ts-ignore
|
||||
if (context.is404) {
|
||||
status = 404
|
||||
console.log("IS 404")
|
||||
} else {
|
||||
cacheIt = true
|
||||
}
|
||||
@@ -154,7 +156,7 @@ const { obj2str, log } = require("../lib/utils")
|
||||
tpl = tpl.replace("<!--HTML-->", html)
|
||||
tpl = tpl.replace("<!--SSR.ERROR-->", error ? "<!--" + error + "-->" : "")
|
||||
tpl = tpl.replace("<!--SSR.COMMENT-->", comment ? "<!--" + comment + "-->" : "")
|
||||
|
||||
console.log("CACHE", cacheIt, noCache)
|
||||
// save cache if adviced
|
||||
if (cacheIt && !noCache) {
|
||||
context.db.create("ssr", {
|
||||
|
||||
Reference in New Issue
Block a user