How to enable CORS headers with terracotta serve?
See original GitHub issueWhen trying the new terracotta preview
against a locally run terracotta 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?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to Set Access-Control-Allow-Origin (CORS) Headers in ...
2. Open Apache Configuration File. You can enable CORS in Apache by modifying Apache Server configuration file, or .htaccess file. Using Apache ...
Read more >Configuration — Terracotta 0.7.6.dev103+g964a72b ...
Your application might need Terracotta to allow CORS for some or all hostnames. For example, this is required when using Mapbox GL to...
Read more >CORS in JAX-RS - Baeldung
There are two ways by which we can enable CORS in JAX-RS. The first and the most basic way is to create a...
Read more >Apache Camel Development Guide Red Hat Fuse 7.0
If true , enables CORS (cross-origin resource sharing) headers in the HTTP response. Default is false . id(). @id. Defines a unique ID...
Read more >Enabling Cross-Origin Resource Sharing (CORS) with HAProxy
OPTION request mengharapkan response yang menyatakan origin, headers, dan HTTP method apa saja yang diijinkan oleh aplikasi backend untuk ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I mean adding
localhost
to allowed origins, so the use caseterracotta serve && terracotta connect
always works. I wouldn’t allow all by default.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