fix(appstore): serve catalog API from secubox-routes.d (beats /api catch-all)

The /api/v1/appstore/ route must live in secubox-routes.d/ (the hub's
authoritative API include) or the generic /api/ -> aggregator catch-all
swallows it (404). Split: API route -> secubox-routes.d/appstore-routes.conf
(standalone appstore.sock), UI -> secubox.d/appstore.conf. Bumps 0.1.1.
This commit is contained in:
CyberMind-FR 2026-06-29 13:20:17 +02:00
parent 66301f4307
commit 58f1f1a2c8
4 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,11 @@
secubox-appstore (0.1.1-1~bookworm1) bookworm; urgency=medium
* fix(nginx): serve the catalog API from secubox-routes.d/ (the
authoritative /api/v1/ include) instead of secubox.d/, so it wins over
the generic /api/ -> aggregator catch-all. UI stays in secubox.d/.
-- Gerald KERMA <devel@cybermind.fr> Mon, 29 Jun 2026 18:00:00 +0200
secubox-appstore (0.1.0-1~bookworm1) bookworm; urgency=medium
* Initial release — App Store Phase A (read-only catalog).

View File

@ -24,6 +24,10 @@ override_dh_auto_install:
install -d $(CURDIR)/debian/secubox-appstore/usr/lib/systemd/system
install -m 644 $(CURDIR)/debian/secubox-appstore.service $(CURDIR)/debian/secubox-appstore/usr/lib/systemd/system/
# Authoritative API route (secubox-routes.d)
install -d $(CURDIR)/debian/secubox-appstore/etc/nginx/secubox-routes.d
install -m 644 $(CURDIR)/nginx/appstore-routes.conf $(CURDIR)/debian/secubox-appstore/etc/nginx/secubox-routes.d/
# Generate the catalog index from every sibling module's debian/secubox.yaml
install -d $(CURDIR)/debian/secubox-appstore/usr/share/secubox/appstore
python3 $(CURDIR)/scripts/gen-appstore-catalog.py \

View File

@ -0,0 +1,9 @@
# /etc/nginx/secubox-routes.d/appstore.conf — Installed by secubox-appstore.
# App Store catalog API, served by the standalone secubox-appstore.service
# over /run/secubox/appstore.sock (no aggregator dependency).
location /api/v1/appstore/ {
rewrite ^/api/v1/appstore/(.*)$ /$1 break;
proxy_pass http://unix:/run/secubox/appstore.sock;
include /etc/nginx/snippets/secubox-proxy.conf;
proxy_intercept_errors on;
}

View File

@ -1,13 +1,6 @@
# /etc/nginx/secubox.d/appstore.conf — Installed by secubox-appstore.
# Read-only App Store catalog API + static UI, served by the standalone
# secubox-appstore.service over /run/secubox/appstore.sock (no aggregator
# dependency, so the module surfaces on a simple nginx reload).
location /api/v1/appstore/ {
rewrite ^/api/v1/appstore/(.*)$ /$1 break;
proxy_pass http://unix:/run/secubox/appstore.sock;
include /etc/nginx/snippets/secubox-proxy.conf;
}
# Static App Store UI. The /api/v1/appstore/ route lives in
# secubox-routes.d/appstore.conf (the authoritative API include).
location /appstore/ {
alias /usr/share/secubox/www/appstore/;