Is there a way to make a remote REST API call within an angular js application without enabling CORS on the server?
Currently, my setup includes bower for dependency management, grunt for server and build task running, and angular js as the front-end framework.
My REST API is deployed on server xxx.xxx.xxx.xxx:9090 with CORS filters configured.
When I access the REST API in my angular js app, it creates two requests, one with options and the other with HTTP verbs.
Many blogs have mentioned that enabling CORS on the server can pose a security risk.
Is there a safe way to consume the REST API in angular without enabling CORS on the server and avoiding domain issues?
My angular app is running on localhost while the REST API is deployed remotely.
After building the application with grunt, I am running it on a tomcat server as I have limited options due to client access issues.
Thank you in advance.