fix(titiler): drop @1x suffix + append SAS token top-level #24
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/titiler-tile-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Live verification of the merged Sentinel-1 SAR feature exposed two bugs that make every tile request fail, even with the /titiler/ nginx + Tailscale Serve wiring in place:
@1xscale suffix breaks TiTiler. The tile template emitted/cog/tiles/WebMercatorQuad/{z}/{x}/{y}@1x, but this TiTilerlatestimage only registers/tiles/{z}/{x}/{y}(strict inty) and.{format}— no@{scale}xvariant. Every request 422s withint_parsingon21@1x.token=.sign_cog_urlwrote?token={quote(token)}, but Azure blob rejects that (403, surfaced by TiTiler as 409). Planetary Computer returns the token as a pre-percent-encoded query string (st=…&se=…&sp=rl&…&sig=…); it must be appended top-level.Proven against the live Pi: the corrected URL form renders a 200
image/png256×256 tile.Changes
app/live_layers.py: drop@1xfromTITILER_COG_TILES;sign_cog_urlappends the token verbatim.tests/test_live_layers.py: update the three assertions pinning the old (broken) URL shape.Verification
pytest tests/test_live_layers.py tests/test_api_live_layers.py→ 46 passedpytest(full) → 151 passed, 16 skippedcurl … /cog/tiles/WebMercatorQuad/8/168/108?url=<signed>&rescale=0,500&colormap_name=cfastie→code=200 size=3197 type=image/pngTiTiler /tiles/{z}/{x}/{y} takes a strict int for y; the @1x scale-suffix template 422s on every SAR tile request (int_parsing on '21@1x'). sign_cog_url wrapped the Planetary Computer SAS token under a single token= param, which Azure rejects (403→409); the token is a pre-encoded query string and must be appended top-level (st=…&se=…&sig=…). Proven live: correct-form URL renders a 200 image/png 256px tile.