Reputation: 1070
I want to host my xml file, so others will have access to make ajax request (JSONP?)
I understand that cannot be achieve because there is a 'corss domain policy'.
but how can I enable it somehow for someone who wants to request it on my server?
Upvotes: 1
Views: 22
Reputation: 2072
Just place the file in your web directory and make sure the file has read access, then it will be accessible by just navigating to the url of the website plus the folder,
for example: www.mySiteURL.com/myxml.xml would be the link to access it after it has been uploaded to your web directory.
EDIT
Based on your comments you need to look into using CORS
see here: http://www.html5rocks.com/en/tutorials/cors
Quick Summary of CORS (from the website):
Cross-Origin Resource Sharing (CORS) is a W3C spec that allows cross-domain communication from the browser. By building on top of the XMLHttpRequest object, CORS allows developers to work with the same idioms as same-domain requests.
Upvotes: 1