-2

I ran into this problem when using this solution to check if the image is valid.

However I get a

No Access-Control-Allow-Origin error

, and I have no access to the image server.

Any help will be appreciate!

Community
  • 1
  • 1
iplus26
  • 2,186
  • 12
  • 25
  • perhaps [this](http://stackoverflow.com/questions/22107694/why-does-a-cross-origin-head-request-need-a-preflight-check) will enlighten you ... reading the question again ... does the server allow cross origin requests? – Jaromanda X Dec 17 '15 at 02:15

1 Answers1

0

The problem lies within JS policy not to allow cross-origin (or to put it simple - cross-domain) requests to prevent intrusions etc. If the server does not allow cross-origin requests (using specific headers in communication), you won't be able to get your image even if it exists.

This and this should enlighten you a bit.

SzybkiSasza
  • 1,457
  • 10
  • 24