Got the cross origin requests working.

The cause of the problem was really stupid. I forgot to put http://
before the action url.