On Mon, 7 Nov 2016 at 11:32 Abhilash Sathe <[email protected]> wrote:
> 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. > The server that is hosting your javascript and html imports (serverthati' mrequesting.com per your example) needs to add the HTTP header (the domain-name in your example should be "localhost"): Access-Control-Allow-Origin: <domain-name of your site> OR to allow everyone to use those assets: Access-Control-Allow-Origin: * The actual configuration of your server is probably beyond the scope of this list. If "serverthati'mrequesting.com" is running Apache then you can find documentation here: https://httpd.apache.org/docs/current/mod/mod_headers.html#header Which suggests to add into your server config a line similar to (for your example): Header add Allow-Access-Control-Origin localhost Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CABtuYwchWzT2rtL5EJwazCGQWY%3DYAe5Fv%2B%3D%3DaHwVJcJXN%3D3fQg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
