add queue

This commit is contained in:
Jon Dough
2024-03-10 08:26:11 +05:30
parent fa4714cfc3
commit db1334e4d9
2 changed files with 106 additions and 17 deletions

11
host.ts
View File

@@ -39,6 +39,17 @@ createServer((req, res) => {
req_path = path.join(__dirname, "build", decodeURI(req.url));
}
}
/*
if (!req_path.startsWith(path.join(__dirname, "build"))) {
//nice try
//bad request
res.writeHead(400);
//write file
res.write("400");
//end response
return res.end();
}
*/
//check for auth
//hopefully no security vulnerabilities. please look away
if (url_obj.pathname !== "/password") {