From a1000840f34eb116012317aa0dd25f42c056a0f3 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Fri, 24 Apr 2026 10:39:44 +1200 Subject: [PATCH] Selective merge from PR #205 --- app/src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/index.ts b/app/src/index.ts index 8f79885..3ad7da6 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -110,6 +110,15 @@ app.post('/share/unlock', async (req, res) => { res.send() }) +/* + * [ROUTE] Catch accidental POST requests to share URLs (e.g. from browser history + * state issues) and force a clean GET redirect. + * See https://github.com/alangrainger/immich-public-proxy/pull/205 + */ +app.post('/:shareType(share|s)/:key/:mode(download)?', (req, res) => { + res.redirect(303, req.originalUrl) +}) + /* * [ROUTE] This is the direct link to a photo or video asset */