From 512acdf74d7f58ed5ffb5e87e94c6d49ba0d3c5f Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Sun, 12 Jul 2026 20:44:28 +0200 Subject: [PATCH] fe: proxy legacy crashes heartbeat/upload without 301 redirect. Old app RA polls POST to /crashes/api/heartbeat.php; permanent redirect drops JSON body and surfaces as HTTP 405 on control-plane status. Co-authored-by: Cursor --- fe/ac-fe.fragment | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fe/ac-fe.fragment b/fe/ac-fe.fragment index 29dce05..78d5df1 100644 --- a/fe/ac-fe.fragment +++ b/fe/ac-fe.fragment @@ -19,6 +19,25 @@ } # --- Legacy /crashes/ โ†’ /issues/ (SPEC ยง7) --- + # Old app builds POST type:ra here; 301 drops body (HttpURLConnection โ†’ GET โ†’ 405). + location = /app/androidcast_project/crashes/api/heartbeat.php { + proxy_pass http://ac_be_backend; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 16m; + } + location = /app/androidcast_project/crashes/api/upload.php { + proxy_pass http://ac_be_backend; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 16m; + } location = /app/androidcast_project/crashes { return 301 $scheme://$host/app/androidcast_project/issues/; }