-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to enable CORS headers with terracotta serve? #197
Comments
Never mind. It works with the env var. Maybe I had something cached somewhere or so. |
Shouldn't we fix this for everyone by changing the default, then? |
Yes! Do you mean the default for We are mostly using Mapbox to load TC layers (sometimes with Deck.gl) these days, so we always need that. Others might not, of course... Hard to tell which is better. I would perhaps prefer to make |
I mean adding |
I'll test whether |
yeah adding localhost by default makes a lot more sense than having no default since modern browsers seem to block localhost requests which have no CORS header set; at least in Firefox |
When trying the new
terracotta preview
against a locally runterracotta serve
, I get errors because of missing CORS headers.This issue is popping up now, because the new preview app is using Mapbox as a map provider instead of Leaflet and data is now loaded programmatically instead of just pasting the PNG links into the browser (which do not requite CORS headers). Anways.
I tried to set
TC_ALLOWED_ORIGINS_TILES
and can see that it gets included in the config at runtime, but somehow that did not help?The text was updated successfully, but these errors were encountered: