Send request form http://cluster.vk.araneum.dev/ to http://aggregator.vk.araneum.dev.
Erorr in browser:
XMLHttpRequest cannot load http://aggregator.vk.araneum.dev/getWidget/ultratrade. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://cluster.vk.araneum.dev' is therefore not allowed access. The response had HTTP status code 404. Nginx config (aggregator.vk.araneum.dev):
location / { root /var/www/aggregator.araneum.dev/source/web; try_files $uri $uri/ /app_dev.php$is_args$args; autoindex on; index app_dev.php; add_header 'Access-Control-Allow-Origin' *; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' *; } JS code:
$(function() { $.ajax({ url: platformDomain+'/getWidget/ultratrade', success: function(responce) { $('#ultratrade-widget').html(responce.widgetHtml); } }); }); What's wrong ?
The response had HTTP status code 404. nginx.org/r/add_header