Closed
Description
When serving tiles, it's sometimes useful to whitelist CORS "access" from more than one domain (but not from everywhere). It would be helpful for me if this was possible with pmtiles.
Since response header Access-Control-Allow-Origin
only allows to specify one domain name, I think the server code could check Origin
header from request, and if it would be one of the whitelisted origins, it would copy it to Access-Control-Allow-Origin
in response.
The whitelisted CORS origins could be listed in the --cors
argument, just comma-separated. For example:
pmtiles serve ./ --cors="https://mydomain.com,https://otherdomain.com"
I could contribute this. Would you be interested in taking it in?
Metadata
Metadata
Assignees
Labels
No labels