Heroj04 / MCC

Mr_Hero's Canvas Creator (Magic Card Creator)
GNU General Public License v3.0
3 stars 0 forks source link

Images hosted on pages without CORS policy fail to download #3

Open Heroj04 opened 3 years ago

Heroj04 commented 3 years ago

When an image layer URL points to an image hosted on a site without a Cross Origin Resource Sharing policy set or it is set to not allow sharing, the image fails to download.
This is actually correct behavior technically, because were using HTML Dom Images. but it's bloody annoying so maybe the image should be actually downloaded.

Heroj04 commented 3 years ago

See this gist

Heroj04 commented 3 years ago

XMLHttpRequests are still subject to CORS policy so the only way to get around this is to host a CORS proxy such as https://github.com/shalvah/cors-escape