Groovy Cross-Domain AJAX functionality
On my current project we have a couple instances of Tomcat running various bits and pieces of our code. If there is a difference in port or protocol between your two controllers, you're going to have issues with cross-domain ajax requests. In order to alleviate the problems, simply add to each function you're testing:
response.setHeader("Access-Control-Allow-Origin", "*")
response.setHeader("Access-Control-Allow-Methods", "GET")
response.setHeader("Access-Control-Allow-Headers", "Content-Type")
response.setHeader("Access-Control-Max-Age", "86400")
