fix: allow HTTP to local instances in release build; fix activity 404 in dev

Android release builds block cleartext HTTP by default (debug builds override
this via the debug manifest overlay). Add usesCleartextTraffic=true to app.json
so expo prebuild includes it in the generated manifest — required to reach local
Bincio instances over HTTP.

In bincio dev (Astro dev server), /activity/<id>/ routes 404 because
getStaticPaths() returns [] and there is no nginx try_files fallback. Add a Vite
middleware plugin to astro.config.mjs that rewrites /activity/<id>/ to /activity/
in dev, matching what nginx does in production.
This commit is contained in:
Davide Scaini
2026-04-25 09:30:02 +02:00
parent 69571c1306
commit d8b3a69564
3 changed files with 70 additions and 11 deletions
+1
View File
@@ -10,6 +10,7 @@
"platforms": ["ios", "android"],
"android": {
"package": "org.bincio.app",
"usesCleartextTraffic": true,
"permissions": [
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.READ_MEDIA_VIDEO",