I'm running a server application in Tomcat 7 on port 8081 of my localhost and a client js-application in wamp (think thats port 80). When I try to run it (in chrome), i'm getting this error in my console:
XMLHttpRequest cannot load http://localhost:8081/blabla/bla/config Origin http://localhost is not allowed by Access-Control-Allow-Origin
Does anyone have an idea how to fix it? The code runs fine if I check with unit test and debugging. The error is thrown when the response reaches the client
If I just go to http://localhost:8081/blabla/bla/config
in my browser, I get the right response in JSON