From a16cc85420651d2078519dc2e1952f9bc8235ff9 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 20 Sep 2026 13:36:09 -0400 Subject: [PATCH] =?UTF-8?q?cinny:=20303=20/share-target=20=E2=86=92=20/sha?= =?UTF-8?q?re=20for=20the=20PWA=20share=20target=20(#155)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The service worker normally answers the share-sheet POST itself; this keeps a POST that reaches nginx before the worker controls the page from returning 405. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA --- cinny/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cinny/nginx.conf b/cinny/nginx.conf index 67350d3..1419a4c 100644 --- a/cinny/nginx.conf +++ b/cinny/nginx.conf @@ -77,6 +77,13 @@ server { proxy_connect_timeout 5; } + # [Gitea #155] PWA share target. The service worker normally answers this + # POST itself; if it isn't controlling the page yet, land on /share + # (the shared files are lost, but nothing 405s). + location = /share-target { + return 303 /share; + } + location / { rewrite ^/config\.json$ /config.json break; rewrite ^/manifest\.json$ /manifest.json break;