Improve TileJSON response with CDN and 2x tiles #621
Replies: 5 comments
-
|
@maxmalynowsky can you check #342 and see if you find useful information |
Beta Was this translation helpful? Give feedback.
-
|
Hi @vincentsarago , thanks for the link, but setting I'm not looking to change After doing more research into this, it seems my issue comes from Starlette's |
Beta Was this translation helpful? Give feedback.
-
|
there is also this discussion #345 (comment) which could be useful |
Beta Was this translation helpful? Give feedback.
-
|
I saw that issue, unfortunately |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if it helps, but in AWS I remember I had to do this 👇 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Problem description
👋 Hey all!
I have TiTiler deployed on an Azure Container App behind a CDN, serving as the backend to a few MapLibre GL maps. The easiest way for me to add data to the maps would be to get a TileJSON, but there are two issues I encountered. This is an example URL I would try:
Request:
https://titiler-cdn.mydomain.com/cog/tilejson.json?tile_format=webp&tile_scale=2&url=https://data.mydomain.com/data.tifResponse:
{ "tilejson": "2.2.0", "version": "1.0.0", "scheme": "xyz", "tiles": [ "http://myapp.azurecontainerapps.io/cog/tiles/WebMercatorQuad/{z}/{x}/{y}@2x.webp?url=https%3A%2F%2Fmydomain.com%2Fdata.tif" ], "minzoom": 8, "maxzoom": 15, "bounds": [-1, -1, 1, 1], "center": [0, 0, 8] }Issues:
tilesproperty comes from the URL my container is deployed to in Azure, but I'd like it to use the request origin of the CDN instead. I'm a bit new at developing with Starlette / FastAPI / TiTiler, so I'm not sure if there's a way to set this as an ENV property anywhere, which would be ideal. Otherwise, I wouldn't mind being able to set atile_urlproperty such ashttps://titiler-cdn.mydomain.comin the query to specify this.Beta Was this translation helpful? Give feedback.
All reactions