mirror of
git://f0xx.org/android_cast
synced 2026-07-29 02:59:00 +03:00
be
This commit is contained in:
@@ -330,25 +330,26 @@ Flow doc: [20260607-2FA-email-mobile-auth-flow.md](20260607-2FA-email-mobile-aut
|
||||
|
||||
---
|
||||
|
||||
## URL shortener (preview — not deployed)
|
||||
## URL shortener
|
||||
|
||||
**Web:** [https://s.f0xx.org](https://s.f0xx.org) (dedicated vhost; FE TLS live)
|
||||
**Web:** [https://s.f0xx.org](https://s.f0xx.org) (dedicated vhost; FE TLS + BE nginx **deployed 2026-06**)
|
||||
|
||||
| Kind | Path | Notes |
|
||||
|------|------|--------|
|
||||
| Health | `GET /api/v1/health` | Stub until PHP handlers deployed |
|
||||
| Shorten | `POST /api/v1/shorten` | Bearer token; see SPEC |
|
||||
| Health | `GET /api/v1/health` | Returns JSON when `backend/url-shortener/public` synced to BE |
|
||||
| Shorten | `POST /api/v1/shorten` | Bearer token; **501 stub** until PHP impl |
|
||||
| QR | `GET /api/v1/qr/{slug}.png` | PNG |
|
||||
| Redirect | `GET /{slug}` | `302` → original URL |
|
||||
|
||||
Spec: [specs/20100611_3_url_shortener.md](specs/20100611_3_url_shortener.md) · scaffold: [backend/url-shortener/](../backend/url-shortener/)
|
||||
|
||||
```bash
|
||||
export BASE=https://s.f0xx.org
|
||||
curl -sS "$BASE/api/v1/health"
|
||||
# Full cookbook: backend/url-shortener/scripts/demo_curl.sh (needs BEARER when live)
|
||||
curl -fsS https://s.f0xx.org/api/v1/health
|
||||
# Full cookbook (when shorten live): backend/url-shortener/scripts/demo_curl.sh
|
||||
```
|
||||
|
||||
**Still TODO:** sync PHP tree to BE docroot, `schema.mariadb.sql`, bearer tokens, shorten/redirect handlers.
|
||||
|
||||
---
|
||||
|
||||
## Non-HTTP services
|
||||
|
||||
@@ -11,6 +11,8 @@ HUB="${HUB_BASE:-${PUBLIC}/app/androidcast_project/}"
|
||||
BUILD="${BUILD_BASE:-${PUBLIC}/app/androidcast_project/build/}"
|
||||
OTA="${OTA_CHANNEL:-${PUBLIC}/v0/ota/channel/stable.json}"
|
||||
|
||||
SHORTENER="${URL_SHORTENER_BASE:-https://s.f0xx.org}"
|
||||
|
||||
fail=0
|
||||
ok() { echo "OK $*"; }
|
||||
bad() { echo "FAIL $*"; fail=1; }
|
||||
@@ -71,6 +73,16 @@ else
|
||||
bad "ota $OTA HTTP $code"
|
||||
fi
|
||||
|
||||
# URL shortener (opt-in vhost — warn until PHP + MariaDB live)
|
||||
code="$(http_code "$SHORTENER/api/v1/health")"
|
||||
if [[ "$code" == "200" ]]; then
|
||||
ok "url-shortener $SHORTENER/api/v1/health HTTP $code"
|
||||
elif [[ "$code" =~ ^(000|502|503|504)$ ]]; then
|
||||
note "url-shortener $SHORTENER/api/v1/health HTTP $code — nginx up? sync backend/url-shortener + php-fpm"
|
||||
else
|
||||
note "url-shortener $SHORTENER/api/v1/health HTTP $code (stub expects 200 when docroot synced)"
|
||||
fi
|
||||
|
||||
# Device APIs (no session) — 403 on public edge is OK if upload/heartbeat work
|
||||
code="$(http_code "$CRASHES/api/diag.php")"
|
||||
if [[ "$code" == "200" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user