assert the token path the client requests, not only the typed one
This commit is contained in:
parent
32e6c1231e
commit
a4d6062e96
1 changed files with 11 additions and 0 deletions
|
|
@ -86,8 +86,19 @@ jobs:
|
|||
|
||||
# Guards graduated from pages.yml: never publish a broken or credential-
|
||||
# leaking web-root. A failure here fails the build — nothing is committed.
|
||||
# ★ ASSERT THE PATH THE CLIENT ACTUALLY REQUESTS, NOT JUST THE TYPED ONE (2026-09-21).
|
||||
# This guarded only token.json, while every generated leaf requests the EXTENSIONLESS
|
||||
# '/api/maps/token' (grep a built leaf: it appears four times, '.json' never). A static host
|
||||
# returns 404 for the extensionless path and 200 for token.json, so a regression that stopped
|
||||
# writing the bare file would have shipped SILENTLY PAST CI with the endpoint "asserted".
|
||||
# write-token.mjs emits BOTH; guard BOTH. The bare one is a BARE TOKEN STRING, not JSON — the
|
||||
# client uses the response verbatim and rejects {"token":"pk..."} as lacking a pk. prefix.
|
||||
- name: Assert the token endpoint exists
|
||||
run: |
|
||||
test -s public/api/maps/token || {
|
||||
echo "::error::public/api/maps/token is missing/empty — this is the path the CLIENT requests; every basemap renders blank."
|
||||
exit 1
|
||||
}
|
||||
test -s public/api/maps/token.json || {
|
||||
echo "::error::public/api/maps/token.json is missing/empty — set the MAPBOX_TOKEN secret, or every basemap renders blank."
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue