Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy failed CORS requests #1

Open
rsify opened this issue Apr 13, 2020 · 2 comments
Open

Proxy failed CORS requests #1

rsify opened this issue Apr 13, 2020 · 2 comments

Comments

@rsify
Copy link
Owner

rsify commented Apr 13, 2020

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 rsify self-assigned this Apr 13, 2020
@rsify
Copy link
Owner Author

rsify commented Apr 13, 2020

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

@AutoSponge
Copy link

AutoSponge commented May 10, 2020

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

@rsify rsify removed their assignment Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants