Change to generic redirect target to be specified by env var
This commit is contained in:
parent
eb4c45f4cf
commit
873bf91f81
4
index.js
4
index.js
@ -1,6 +1,8 @@
|
|||||||
Bun.serve({
|
Bun.serve({
|
||||||
port: 8080,
|
port: 8080,
|
||||||
fetch(req, res) {
|
fetch(req, res) {
|
||||||
return Response.redirect("https://git.cbraaten.dev", 302);
|
return Response.redirect(Bun.env.REDIRECT_TARGET, 302);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(`Redirecting Trafic to ${Bun.env.REDIRECT_TARGET}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user