Gibbet
Gibbet

Reputation: 143

Parse Client API Key causes CORS exception in Angular app

I have create an app that uses the Parse.com rest API. I've created a factory using $resource that defines a get with the required parse.com headers.

When I run this app with the parse headers X-Parse-REST-API-Key it works as expected but when I use X-Parse-Client-Key the application throws a CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.parse.com/1/classes/Games. This can be fixed by moving the resource to the same domain or enabling CORS.

These headers work with client key on Chrome's Postman. I've also checked config.xml to ensure <access origin="*" />

I want to use the client key because Parse documentation warns against using the rest-api key on clients...

Upvotes: 1

Views: 302

Answers (1)

Gibbet
Gibbet

Reputation: 143

I ended up using the Rest key instead of the client key as I cannot change the setup of the parse.com service!

Upvotes: 0

Related Questions