feat(lst): added in basic authentication

This commit is contained in:
2025-02-17 20:01:04 -06:00
parent ca27264bb0
commit 5f7a3dd182
25 changed files with 810 additions and 154 deletions

View File

@@ -0,0 +1,10 @@
import app from "../index";
const request = new Request("http://localhost/protected", {
headers: {
Authorization: "Basic " + Buffer.from("admin:password12").toString("base64"),
},
});
const response = await app.fetch(request);
console.log(await response.text()); // Should print "You are authenticated!"