memory: log task worker session - due dates, subtasks, task page
This commit is contained in:
21
hook-proxy.ts
Normal file
21
hook-proxy.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
const server = Bun.serve({
|
||||
port: 18790,
|
||||
hostname: "0.0.0.0",
|
||||
async fetch(req) {
|
||||
const url = new URL(req.url);
|
||||
if (!url.pathname.startsWith("/hooks")) {
|
||||
return new Response("Not Found", { status: 404 });
|
||||
}
|
||||
const target = `http://127.0.0.1:18789${url.pathname}${url.search}`;
|
||||
const resp = await fetch(target, {
|
||||
method: req.method,
|
||||
headers: req.headers,
|
||||
body: req.method !== "GET" ? await req.text() : undefined,
|
||||
});
|
||||
return new Response(resp.body, {
|
||||
status: resp.status,
|
||||
headers: resp.headers,
|
||||
});
|
||||
},
|
||||
});
|
||||
console.log(`Hook proxy listening on 0.0.0.0:${server.port}`);
|
||||
Reference in New Issue
Block a user