Is there a way to make an Ajax request to
s3-ap-southeast-1.s3.amazonaws.com (to S3 API)
from
s3.amazonaws.com
(from where a JavaScript app that is hosted at)?
Setting up a CORS policyBy default you are not allowed to make AJAX requests to another domain. Your browser applies the Same-origin policy as part of the web security model.
CORS is a mechanism that defines a procedure in which the browser and the web server interact to determine whether to allow a web page to access a resource from different origin. Figure 2. Cross domain ajax request. When you do a cross-origin request, the browser sends Origin header with the current domain value.
Cross-domain tracking only applies if you have multiple domains. If you have a single domain with multiple subdomains, cross-domain tracking is not necessary!
You cannot do cross-domain ajax requests. That includes subdomains. However, it is possible to use JSONP.
yes, you can cross domain ajax calls, check cross-origin resource sharing: http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing
Cross domain ajax requests are forbidden by protocol. And yes, subdomains too.
Read here: http://www.ajax-cross-domain.com/ It might help;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With