XMLHttpRequest cannot load http://serverthati'mrequesting.com?id=1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. I used CORS add on in chrome and then it works. But otherwise it doesn't. How can I fix this? I'm using node js server. polymer-cli tools.
<iron-ajax
id="requestRepos"
headers='{"Accept": "*/*"}'
url="http://serverthati'mrequesting.com"
params="{{requestParams}}"
handle-as="json"
on-response="handleResponse" ></iron-ajax>
XMLHttpRequest cannot load http://serverthati'mrequesting.com?id=1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. I used CORS add on in chrome and then it works. But otherwise it doesn't. How can I fix this? I'm using node js server. polymer-cli tools.
Header add Allow-Access-Control-Origin localhost