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

[feature] Add configuration to csrf to be able to change default /csrfToken route #2366

Closed
konstantinzolotarev opened this issue Nov 5, 2014 · 6 comments

Comments

@konstantinzolotarev
Copy link
Member

Need to add a config option to sails.config.csrf to be able to change default route for getting _csrf parameter for forms.

Something like this:

module.exports.csrf = {
    route: '/api/csrfToken'
};
@akhoury
Copy link

akhoury commented Nov 5, 2014

+1

@sahanDissanayake
Copy link

Hi guys,

Anyone know the answer to this ??

http://stackoverflow.com/questions/26795796/sailsjs-csrf-mismatch-error-customize

@konstantinzolotarev
Copy link
Member Author

Sorry for a delay had too much work on weekends.
Posted reply on stackoverflow.

@dottodot
Copy link

At the moment it's not possible to use csrf when using a route prefix. Is there a fix or solution that can be used?

@konstantinzolotarev
Copy link
Member Author

PR is still open. So you could fork repo and apply it locally.

@loicsaintroch
Copy link
Contributor

Merged f5cf006. Thank you guys.

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

No branches or pull requests

5 participants