Yes, it's an Apache Tomcat server. So, I guess, I'll need to add the the Allow CORS tag snippet in that.
On Monday, November 7, 2016 at 7:46:54 PM UTC+5:30, Daniel Llewellyn wrote: > > > > On Mon, 7 Nov 2016 at 11:32 Abhilash Sathe <[email protected] > <javascript:>> 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/c125d999-49cd-4010-ae76-7f2ad73a35c5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
