There is a web server on my LAN, at 10.xxx
, on machine A.
I have an HTML page on machine B. This HTML page wants to make an AJAX request to the web server at 10.xxx
. I made the page (with URL of file://abc.html
) and tried it and got
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://XXXXXXXXXXX/ajax_info.txt. (Reason: CORS header 'Access-Control-Allow-Origin' missing)
My questions:
Is there any way I can enable this in Mozilla?
How can we make requests to Facebook, Twitter, and jQuery library servers via AJAX if cross-domain requests are prohibited?
Can I add
'Access-Control-Allow-Origin'
to vanilla AJAX requests?
This is probably a common question. I have seen lots of questions similar to this on Google, and SO as well.