I want to take an html snapshot of my angularjs SPA. Angular application is getting data from tomcat server on another domain. SPA can successfully get data if on chrome browser, but get following error when inside phantomjs browser.
ERROR{"data":null,"status":0,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"url":"https://localhost:8443/gomovie/control/getHomeData","headers":{"Content-Type":"application/json","Accept":"application/json, text/plain, */*"},"data":""},"statusText":""} (from line #undefined in "undefined")
Angular app is served using a nodejs server, which call phantom js to take HTML snapshot, if the url has ?_escaped_fragment_ in it. Server is deployed using apache ofbiz which uses tomcat internally. I have used default cors filter provided by Tomcat to support CORS on server side (and it works on chrome and firefox atleast).