Invalid csrf token #2438
Unanswered
jamesli2021
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I tried to swap to header in echo config The fetch post send from Node to Go would look like this and still get invalid csrf token that has random string:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
In my other test with Passing formdata from Node backend :3000 to Go :9003 means cookie is still need in the header? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
By default, my Go app serving a contact form with CSRF is working fine in development machine
localhost:3008
Recently, I have adopt new JavaScript framework e.g. AstroJS that use SSR Sever-side
localhost:3000
which will render it own contact form, I have crafted another echo route/getNewCSRFToken
for Node app to read CSRF token then render into the HTMLWhen submit the form, it appear that I have an invalid token.
{"message":"invalid csrf token"}
Assume
form:coo
is not enough or will only work with both Go and Node app behind nginx reverse proxy?Beta Was this translation helpful? Give feedback.
All reactions