-
Notifications
You must be signed in to change notification settings - Fork 66
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
Csrf fix #2858
base: main
Are you sure you want to change the base?
Csrf fix #2858
Conversation
Signed-off-by: Muralidhar Basani <muralidhar.basani@aiven.io>
Signed-off-by: Muralidhar Basani <muralidhar.basani@aiven.io>
Signed-off-by: Mirjam Aulbach <mirjam.aulbach@aiven.io>
|
||
const headers = { | ||
...options.headers, | ||
...(csrfToken ? { "X-CSRF-TOKEN": csrfToken } : {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand it, usually X-XSRF-TOKEN
is enough, but it seems BE expects X-XSRF-TOKEN
to be sent, too. There may be a legacy/backwards-compatibility config in BE for this. Angular sends both, so I added it to be consistent (and well, because we need to to work :D)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one. I missed to update it back.
Now I updated BE to use only X-XSRF-TOKEN. It works in Angular.
Can you pls try removing it and see if it works in react too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is my only outstanding question as well aside from that i think it looks good.
Signed-off-by: Muralidhar Basani <muralidhar.basani@aiven.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coral side looks good to me 👍🏼
Signed-off-by: Muralidhar Basani <muralidhar.basani@aiven.io>
Linked issue
Resolves: #xxxxx
What kind of change does this PR introduce?
What is the current behavior?
Describe the state of the application before this PR. Illustrations appreciated (videos, gifs, screenshots).
What is the new behavior?
Describe the state of the application after this PR. Illustrations appreciated (videos, gifs, screenshots).
Other information
Additional changes, explanations of the approach taken, unresolved issues, necessary follow ups, etc.
Requirements (all must be checked before review)
main
branch have been pulledpnpm lint
has been run successfully