1
0
mirror of git://f0xx.org/ac/ac-platform-edge synced 2026-07-29 01:39:22 +03:00
Files
ac-platform-edge/fe/ac-fe.fragment
Anton Afanasyeu 512acdf74d 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 <cursoragent@cursor.com>
2026-07-12 20:44:28 +02:00

47 lines
1.9 KiB
Plaintext

# Paste into the listen 443 server {} for apps.f0xx.org (or lab acl0 vhost in ac-fe.conf).
# Requires upstream ac_be_backend in http {} — defined at top of ac-fe.conf.
#
# When enabling on prod: comment out the old blocks in /etc/nginx/apps.conf for
# /app/androidcast_project/crashes and /crashes/ (keep graphs/build/hub as-is until cutover).
# --- Issues / ticket console (SPEC: /issues/ is canonical) ---
location = /app/androidcast_project/issues {
return 301 $scheme://$host/app/androidcast_project/issues/;
}
location ^~ /app/androidcast_project/issues/ {
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;
}
# --- 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/;
}
location ^~ /app/androidcast_project/crashes/ {
rewrite ^/app/androidcast_project/crashes/?(.*)$ $scheme://$host/app/androidcast_project/issues/$1 permanent;
}