themes im backend etzala
This commit is contained in:
@@ -37,6 +37,14 @@ import router from "./inc/router.mjs";
|
||||
"Cache-Control": "no-cache, public",
|
||||
"Location": target
|
||||
}).end();
|
||||
|
||||
req.cookies = {};
|
||||
if(req.headers.cookie) {
|
||||
req.headers.cookie.split("; ").forEach(c => {
|
||||
const parts = c.split('=');
|
||||
req.cookies[parts.shift().trim()] = decodeURI(parts.join('='));
|
||||
});
|
||||
}
|
||||
|
||||
!(r = router.routes.getRoute(req.url.pathname, req.method)) ? res.writeHead(404).end(`404 - ${req.url.pathname}`) : await r(req, res);
|
||||
console.log([
|
||||
|
Reference in New Issue
Block a user