-
Notifications
You must be signed in to change notification settings - Fork 121
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
How to get XSRF token before first post request #95
Comments
Same issue here. I even made an endpoint for the client to grab the token and I put it in the request header "X-XSRF-TOKEN". But I still get the error that the token is missing. In the Chrome console I can see it in the request. I'm not using angular in this case. Using jquery with some code something like this...
|
Is there any Progress in this? |
I am having this same issue.
In my client, I am using jQuery :
On POST submission I get a Token mismatch error. |
Are there any updates or fixes for this? |
Hi everyone! This is NOT a problem of if you replace..
with..
And then you `curl -s -v 'http://localhost:3000/', you will see the Set-Cookie with the CRSF token being set. The problem is caused by The fix described above is NOT correct though. It causes many other issues related to webpack... I played a lot trying to find a nice solution, and a simple solution that worked for me was to rename I pushed a pull request with the proper fix here angular-fullstack/generator-angular-fullstack#2613 |
Hi,
I am trying to move authentication to my first loaded route -> '/' - the index page, and I have to send the post request twice because the XSRF token is missing. What should I change in the config of lusca?
app.use(lusca({
csrf: {
angular: true
},
xframe: 'SAMEORIGIN',
hsts: {
maxAge: 31536000, //1 year, in seconds
includeSubDomains: true,
preload: true
},
xssProtection: true
}));
The text was updated successfully, but these errors were encountered: