From c1a91ab610f4c3219af87125030b390cf3215f57 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 31 Aug 2023 09:28:19 -0400 Subject: [PATCH 1/2] fix: Fix route redirect --- src/backend/server/tautulliRoutes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/server/tautulliRoutes.ts b/src/backend/server/tautulliRoutes.ts index a3865cb1..bb1d4e3c 100644 --- a/src/backend/server/tautulliRoutes.ts +++ b/src/backend/server/tautulliRoutes.ts @@ -44,7 +44,7 @@ export const setupTautulliRoutes = (app: ExpressWithAsync, logger: Logger, scrob }; app.postAsync('/tautulli', async function(req, res) { - res.redirect(307, 'api/plex/tautulli'); + res.redirect(307, '/api/tautulli/ingress'); }); app.postAsync('/api/tautulli/ingress', tautulliIngressRoute); } From e4a647d425b9228d376f25666fbfc15153c6fca8 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 31 Aug 2023 09:29:11 -0400 Subject: [PATCH 2/2] fix(jellyfin): Attempt to fix route redirect #92 Should not be appending to route but replacing...see if leading slash fixes things --- src/backend/server/jellyfinRoutes.ts | 2 +- src/backend/server/plexRoutes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/server/jellyfinRoutes.ts b/src/backend/server/jellyfinRoutes.ts index da383777..6a580b05 100644 --- a/src/backend/server/jellyfinRoutes.ts +++ b/src/backend/server/jellyfinRoutes.ts @@ -12,7 +12,7 @@ export const setupJellyfinRoutes = (app: ExpressWithAsync, logger: Logger, scrob const jellyfinJsonParser = bodyParser.json({type: 'text/*'}); const jellyIngress = new JellyfinNotifier(); app.postAsync('/jellyfin', async function(req, res) { - res.redirect(307, 'api/jellyfin/ingress'); + res.redirect(307, '/api/jellyfin/ingress'); }); app.postAsync('/api/jellyfin/ingress', async function (req, res, next) { diff --git a/src/backend/server/plexRoutes.ts b/src/backend/server/plexRoutes.ts index f16590e7..417bd848 100644 --- a/src/backend/server/plexRoutes.ts +++ b/src/backend/server/plexRoutes.ts @@ -37,7 +37,7 @@ export const setupPlexRoutes = (app: ExpressWithAsync, logger: Logger, scrobbleS res.send('OK'); }; app.postAsync('/plex', async function (req, res) { - res.redirect(307, 'api/plex/ingress'); + res.redirect(307, '/api/plex/ingress'); }); app.postAsync('/api/plex/ingress', plexIngressMiddle, plexMiddle, plexIngressRoute); }