3 ms·
A neat thing about GitHub is that every file on it can be accessed from URLs like https://raw.githubusercontent.com/simonw/llm-prices/refs/heads/main/data/opena
by simonw 1y ago
A neat thing about GitHub is that every file on it can be accessed from URLs like https://raw.githubusercontent.com/simonw/llm-prices/refs/heads/main/data/openai.json https://raw.githubusercontent.com/simonw/llm-prices/refs/hea... which are served through a CDN with open CORS headers - which means any JavaScript application running anywhere can access them.
Demo: https://tools.simonwillison.net/cors-fetch?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsimonw%2Fllm-prices%2Frefs%2Fheads%2Fmain%2Fdata%2Fopenai.json https://tools.simonwillison.net/cors-fetch?url=https%3A%2F%2...
- avhon1 1y agoThat feature seems common to other git hosts / forges. For example, here's one of Dillo's files, from a few commits ago, from their cgit-based host https://git.dillo-browser.org/dillo/plain/src/ui.cc?id=29a46a2da7e9350a1252e30aea3c8294097f63a4 https://git.dillo-browser.org/dillo/plain/src/ui.cc?id=29a46...
- simonw 1y agoThat doesn't have open CORS headers: https://tools.simonwillison.net/cors-fetch?url=https%3A%2F%2Fgit.dillo-browser.org%2Fdillo%2Fplain%2Fsrc%2Fui.cc%3Fid%3D29a46a2da7e9350a1252e30aea3c8294097f63a4 https://tools.simonwillison.net/cors-fetch?url=https%3A%2F%2... It's also not being served via a caching CDN, which means I don't feel comfortable running anything automated against it as that might add load to the server that they aren't ready for.