5 ms·
Any chance you’re willing to enable CORS on these endpoints? (Access-Control-Allow-Origin: * response header.)
by mbostock 6y ago
Any chance you’re willing to enable CORS on these endpoints? (Access-Control-Allow-Origin: * response header.)
- chatmasta 6y agoHey! Big fan of your work. For the REST API endpoints (e.g. [0] [1]), we do set the Access-Control-Allow-Origin header to *, but for GET requests we do not send it at all. I'm not sure if this is the same as setting it to star. We can set it explicitly though; we do want to enable this use case (eventually we'll have quotas). Soon we're releasing a Web UI for writing SQL queries. Part of that will include an HTTP (or websocket maybe) endpoint that takes a SQL query and returns the rows, so you'll be able to execute SQL queries directly from the browser. As an aside, we'd love to get this working with Observable! Let us know anything we can do to help. You can email me at miles@splitgraph.com or join the Discord and we can figure it out :) [0] Docs: https://www.splitgraph.com/cambridgema-gov/covid19-cumulative-cases-by-date-tdt9-vq5y/latest/-/api-schema https://www.splitgraph.com/cambridgema-gov/covid19-cumulativ... [1] Endpoint (powered by PostgREST): https://data.splitgraph.com:443/cambridgema-gov/covid19-cumulative-cases-by-date-tdt9-vq5y/latest/-/rest/covid19_cumulative_cases_by_date https://data.splitgraph.com:443/cambridgema-gov/covid19-cumu...
- dylz 6y agoNot setting it is equivalent to a deny
- chatmasta 6y agoOk, so this should be working now, for all types of requests. Let us know if it's not. If you're testing with the same endpoints, you may need to give the cache a few minutes to evict the old values missing the header.
- mbostock 6y agoIt works, thanks! https://observablehq.com/@mbostock/hello-splitgraph https://observablehq.com/@mbostock/hello-splitgraph