You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ejs.renderFile(path.join(__dirname,'..','views','error','error-xxx.ejs'),{statusCode: 404,message: "Page not found",info: "Request can not be served",reason: "The requested page was not found",domain: process.env.DOMAIN,back_url: process.env.DOMAIN,curentUnixTime: newDate().getTime()},(err,str)=>{
286
+
if(err)throwerr;
287
+
res.header('Content-Type','text/html');
288
+
res.send(str);
289
+
});
290
+
}else{
291
+
res.header('Content-Type','application/json');
292
+
res.json({message: "Page not found",info: "Request can not be served",reason: "The requested page was not found"});
ejs.renderFile(path.join(__dirname,'..','views','error','error-xxx.ejs'),{statusCode: 404,message: "Page not found",info: "Request can not be served",reason: "The requested page was not found",domain: process.env.DOMAIN,back_url: process.env.DOMAIN,curentUnixTime: newDate().getTime()},(err,str)=>{
347
-
if(err)throwerr;
348
-
res.header('Content-Type','text/html');
349
-
res.send(str);
350
-
});
351
-
}else{
352
-
res.header('Content-Type','application/json');
353
-
res.json({message: "Page not found",info: "Request can not be served",reason: "The requested page was not found"});
0 commit comments