Skip to content
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

Add "Access-Control-Allow-Methods" for available methods #26

Closed
TUNER88 opened this issue Feb 11, 2015 · 3 comments
Closed

Add "Access-Control-Allow-Methods" for available methods #26

TUNER88 opened this issue Feb 11, 2015 · 3 comments

Comments

@TUNER88
Copy link

TUNER88 commented Feb 11, 2015

I try to DELETE angular resource, and get following error in Chrome Console.

XMLHttpRequest cannot load http://localhost:8080/concepts/12. Method DELETE is not allowed by Access-Control-Allow-Methods.

If i add Allow-Methodes header in request.js everything works fine.

exports.headers = function(req, res, next) {
    res.set('X-Powered-By', 'Drakov API Server');
    res.set('Access-Control-Allow-Methods','DELETE'); // fix Allow-Methods error
    next();
};

It would be nice, if you can dynamically add Header for all available methods

screen shot 2015-02-11 at 15 00 36

@yakovkhalinsky
Copy link
Contributor

definitely a quick win, will get that in for the next milestone release 👍

@yakovkhalinsky
Copy link
Contributor

Have added this into #29

Just waiting for the build to go green, then I will merge it into master.

You can expect this to be available via npm on Saturday 👍

@TUNER88
Copy link
Author

TUNER88 commented Feb 12, 2015

Awesome support, thx!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants