pico icon indicating copy to clipboard operation
pico copied to clipboard

Proxy failed CORS requests

Open rsify opened this issue 5 years ago • 2 comments

Many foreign origin CDN's don't set CORS headers when serving their assets (images, style sheets, fonts) which leads to our program not being able to read the asset's contents. For situations like that it seems that the only workaround is falling back onto a simple proxy that will fetch the asset and serve it with friendly CORS headers.

The proxy only needs to be really simple, I haven't thought of exact requirements but this gist looks like a good resource to start with.

rsify avatar Apr 13 '20 14:04 rsify

Another inspiration source https://github.com/niklasvh/html2canvas-proxy-nodejs

rsify avatar Apr 13 '20 20:04 rsify

You can also run chrome with security disabled --disable-web-security flag. But at that point you should probably just use puppeteer/playwright/CDP.

AutoSponge avatar May 10 '20 16:05 AutoSponge