4 ms·
There's many services to solve this pain point. I've used https://allorigins.win/ https://allorigins.win/ in the past.
by tasuki 2y ago
There's many services to solve this pain point. I've used https://allorigins.win/ https://allorigins.win/ in the past.
- aizk 2y agoOh this looks neat!
- ahoka 2y agoNeet, if you want to leak your users' credentials in a XSS attack.
- pooper 2y agoI would only use something like this that requires absolutely no authentication. For example, I had a one page app that showed me instantly when the next shuttle(s) were scheduled for my stop. Instead of having to click through multiple steps, this allowed me to see it in one step. As far as I know, I was the only user for this thing I built and put up on gitlab pages. I don't know exactly because I didn't bother to track who visited the page.
- reynaldi 2y agoThis is the way to go, you wouldn't want to use a CORS proxy for something authenticated/with credentials (e.g. API key). But for public unauthenticated request, they work just fine.
- aizk 2y agoOh that explains why it's not a popular architecture.
- swyx 2y agothis ol' one as well https://github.com/Rob--W/cors-anywhere https://github.com/Rob--W/cors-anywhere
- reynaldi 2y agoThese services are called CORS proxies! I recently made an updated list of the currently working free ones here: https://gist.github.com/reynaldichernando/eab9c4e31e30677f176dc9eb732963ef https://gist.github.com/reynaldichernando/eab9c4e31e30677f17... Do note that these proxies are for testing only, and they are heavily rate limited. For production use case, you might consider using Corsfix (https://corsfix.com https://corsfix.com) (I am affiliated with Corsfix)