0

i got the error

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://url/20211691891095.jpg. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

please what is the solution to this errror

Paulos Ab
  • 319
  • 4
  • 16
  • Looks like your question has already been marked as duplicate by someone else. But for what it's worth, this often happens when the server doesn't have the origin URL added to the whitelist. Check your remote logs, grab the origin, and added it to your list of allowed URLs. – Porter Lyman Apr 01 '21 at 21:21
  • Thanks for the reply, I'm requesting a file on a shared hosting server which does not make it possible to request files on the domain through cross origin request, but I've found another way i'm using to fetch the files, I'm now sending an ajax request to a php file on the server in which I allowed cross origin request, then the php file get the requested file, look for it, convert it to base64 enc string then return it through JSON encode – Paulos Ab Apr 03 '21 at 04:58

0 Answers0