Use a custom header for branches

main
Aditya Thakral 1 year ago
parent 6082683996
commit 22870cf023
  1. 3
      index.ts

@ -15,6 +15,7 @@ const base64 = Buffer.from(
app.post("/", (req, res) => {
const header = req.header("authorization");
const branch = req.header("x-branch");
if (header == null) {
res.status(403).send("Authorization header is needed");
@ -38,7 +39,7 @@ app.post("/", (req, res) => {
return;
}
res.send(updateWebsite("main"));
res.send(updateWebsite(branch ?? "main"));
});
app.listen(PORT, () => {

Loading…
Cancel
Save