I have a SharePoint hosted app. I need to access data from host web using rest api. But when I try accessing the data I get following error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<server-name>/PWA/_api/projectserver/projects. This can be fixed by moving the resource to the same domain or enabling CORS.