I have setup CORS on my Dreamfactory Server. I have been developing with a app by using my local web server and reading in the swagger api to get access to dreamfactory. In the past I have been communicating with another server and receiving data back with ajax calls. All of a sudden I am now getting a message in the console that says “Cross Origin Request Blocked”.
I have two questions.
Why now do I get this error after having success getting data back before.
How do I fix it when my CORS is setup on my dreamfactory account.
I am working on a MacOS. Lion.
Update, I added more time to the timeout and instead of using Header set, I used Header add and it seems to be working now.
Okay. So, it sounds like you the number of REST calls wasn’t the issue but related to the amount of time in which you performed these calls… fair assumption?
I have read this thread above and hoped that I will read something new.
I have the same problem right now, because my angularjs app cannot authenticate with the dreamfactory service.
I did everything required without succes.
- dsp_url - ok
- dsp_api_key - ok
- user has right for the services
- and finally the cors set up with *
I got this error every time:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dsp-xxxx.cloud.dreamfactory.com/rest/user/session. This can be fixed by moving the resource to the same domain or enabling CORS.
If I call the service with any json client I will get the right answer with the details of the user.
Please help me, I spent a lot of time with this problem.
I don’t know what happened, but my error message changed to “Login request is missing required email.” (400)
All my login requests that worked before fine to other application give the same error message.
I tried with Curl and the same result:
curl -k -3 -X POST https://dsp-NAME.cloud.dreamfactory.com/rest/user/session -H “X-DreamFactory-Application-Name: APP-NAME” -d “{ “email” : "email@gmail.com”, “password” : “pass123” }";