For some reason the CORS head: https://observable-cors.glitch.me/ stopped working and I have to use my own CORS head.
CORS bypass is possible with https://observablehq.com/@tomlarkworthy/serverside-cells
Would people be interested?
glitch.com instances are rate limited, and judging from the history (yes, the instance is back up), someone has been making heavy use of this one:
Mon Dec 07 2020 16:38:39 GMT+0000 (UTC) 🚋 https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD&slug=aave&time_end=2020-11-29&time_start=2020-09-30
Mon Dec 07 2020 16:38:39 GMT+0000 (UTC) 🚋 https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD&slug=uniswap&time_end=2020-11-29&time_start=2020-09-30
Mon Dec 07 2020 16:38:39 GMT+0000 (UTC) 🚋 https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD&slug=gnosis-gno&time_end=2020-11-29&time_start=2020-09-30
(it goes on forever)
You can create your own instance by forking the project at https://glitch.com/edit/#!/observable-cors. And while you’re at it, you might want to limit access to your notebook’s origin. Other origins can still invoke the instance (and count towards the rate limit), but they won’t have much use for it this way.
Thank you so much for checking this for me. I already change the CORS head for this notebook and I am going to modify the code so the notebook won’t abuse the glitch.com instance. I wonder whether the rate limit will reset the next day?
Glitch enforces a rate limit of 4000 requests per hour for free plans. You can find out more about Glitch’s limits and restrictions here:
I’d recommend to also add some informational headers to your responses so that you can check your instance status more easily. Check e.g. the x-glitch-*
headers in this project.
You might also want to look at https://observablehq.com/@asg017/cors-anywhere-for-observables and https://observablehq.com/@severo/setup-your-own-cors-proxy