Get sending JSON on discourse

(SMHassanAlavi) #1

Hi every one.I have a discourse website and I have a local disocurse too on my laptop.

     $.getJSON("", function (data) {                 });
this code works on my local but doesn't work in my real web site.I put it in header in local and real web site
does anyone khow why code is running properly in local but doesn't run on web?

(Blake Erickson) #2

It might not be working on your real website because of CORS. Just a guess.

(SMHassanAlavi) #3

sometimes it works fine but mostly doesn’t
what is CORS?

(Jeff Atwood) #4

Try doing a google search for the word “CORS”