From 02f2938788b3c9f32652f7ab04c79026db65a6fd Mon Sep 17 00:00:00 2001 From: Romaric Mourgues Date: Wed, 19 Apr 2023 15:50:13 +0200 Subject: [PATCH] Fix node reverse proxy --- tdrive/backend/node/src/services/applications-api/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdrive/backend/node/src/services/applications-api/index.ts b/tdrive/backend/node/src/services/applications-api/index.ts index 5e03349e..8fa658e7 100644 --- a/tdrive/backend/node/src/services/applications-api/index.ts +++ b/tdrive/backend/node/src/services/applications-api/index.ts @@ -26,8 +26,9 @@ export default class ApplicationsApiService extends TdriveService { const { proxy, close } = FastProxy({ base: domain, }); + console.log("Listening at ", "/" + prefix.replace(/(\/$|^\/)/gm, "") + "/*"); fastify.addHook("onClose", close); - fastify.all("/" + prefix.replace(/(\/$|^\/)/, "") + "/*", (req, rep) => { + fastify.all("/" + prefix.replace(/(\/$|^\/)/gm, "") + "/*", (req, rep) => { proxy(req.raw, rep.raw, req.url, {}); }); }