Open rsify opened 4 years ago
Another inspiration source https://github.com/niklasvh/html2canvas-proxy-nodejs
You can also run chrome with security disabled --disable-web-security
flag. But at that point you should probably just use puppeteer/playwright/CDP.
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.