AWS S3 and CORS
cristianocca opened this issue · comments
Cristiano Coelho commented
Getting the following error when trying to load a remote PDF file from S3.
Access to XMLHttpRequest at '<URL>' from origin 'http://localhost:8123' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
pdf.worker.js:33922 Refused to get unsafe header "Accept-Ranges"`
Any work-around?
Ephra commented
I also stuck on the same issues for hours.
vandenoever commented
does your server on localhost set the 'Access-Control-Allow-Origin' header? It is needed according to the error message.
Access-Control-Allow-Headers: Accept-Ranges
might do the trick.