-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular http service not responding #69
Comments
I have got a bit further but not much!
Angular http service now calls get instead of options but it just keeps looping and inevitably crashes!!!
|
i think instead of adding in the custom headers to the blueprint file, i need to work out for local development how to host drakov and grunt connect on the same domain (localhost). I think i need a proxy!!! |
CORS is enabled by default, so I'm not sure if I can explain why it doesn't respond. Are you able to post the endpoint snippet from the markdown file? |
Cheers for the reply mate. This is my code snippet from my .md file.
In the server log I see: [LOG] Setup Route: GET /api/subscribe Subscribe by email I have added in the config to use a connect-proxy. Once I did this, it resolved the issue!!! This is a snippet of the proxy config in my gruntFile.js proxies: [{
context: '/api', // the context of the track microservice api
host: 'localhost', // wherever the data service is running
port: 3000 // the port that the microservice is running on
}], Do you believe I do not need the proxy? |
sorry for the late reply, we use Drakov with protractor tests that run static Angular.js interfaces with no need of a proxy. Maybe the proxy is modifying the headers somehow. |
From what I read, you need a proxy when you are running a back-end server to prevent CORS. Closing as the above plugin worked for me. |
Hi,
I have drakov running using grunt on localhost:3000.
My endpoint I can hit via browser or postman.
Example:
http://localhost:3000/subscribe?id=12345&type=xyz&email=xyz&hv=xyz
But when I try and call the api in angular, in the server console it logs continuously:
Code snippet angular:
My grunt config:
NB: My angular app is running on a different port using connect on port 9000.
The text was updated successfully, but these errors were encountered: