-
Notifications
You must be signed in to change notification settings - Fork 2k
how to temporally disable the cors ? #1609
Comments
You can enable CORS on your destination API. I use this in a couple of my projects: https://github.com/expressjs/cors. Their documentation is really good, and the library's api is easy to use. You will have to add a |
which works!! |
@helxsz where in meanjs app should I add this configuration for cors ? |
@jpca999 as codydaig shows above, in the module.exports.initMiddleware = function (app) |
Resolved thx guys! :-) |
@helxsz - I think you need to pass @codydaig - I added the cors package, and added configuration for cors in express, but nothing is changing. I can make the the cross origin request call with angular/js/html in a simple, stand-alone page/app, but with node/express, it's not working; I'm getting the error message.
|
currently I am using the angular- cli to build a web app, which uses the meanjs api, so they are using the local ip address but the two servers are based on two different ports. Because of this, the angular web app receives Origin 'http://localhost:4200' is therefore not allowed access.
how would I be able to shortly disable the cors so I can easily test the angular app?
best rgds
The text was updated successfully, but these errors were encountered: