Problem:
I want to fetch all the sites that I'm following but want to eliminate those that don't have newsfeed/site feed enabled.
There is a REST endpoint to fetch all the sites that I'm following:
/_api/social.following/my/followed(types=4)
This rest endpoint gives me all the sites that I am following but doesn't tell me anything about if that site has newsfeed or not.
So I have to make another REST call to this one:
/_api/web/features/getById(guid'15a572c6-e545-4d32-897a-bab6f5846e18')
The problem is that I am not in SharePoint context. I am doing all this in an AngularJS app and when I try to access this endpoint, I get an exception:
XMLHttpRequest cannot load /_api/web/features/getById(guid'15a572c6-e545-4d32-897a-bab6f5846e18'). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.
Is there any better way to deal with this? Do I need to set a header in my REST call to not get this cross domain exception?
Thanks