T
TanStack4mo ago
sensitive-blue

Adding request headers when calling useServerFn for CSRF implementation

I am trying to implement CSRF wherein i need to pass request header which will be my csrf token received during login request, can someone direct on how to achieve this functionality. I am using useServerFn to make requests wherein this would be implemented
3 Replies
other-emerald
other-emerald4mo ago
just pass in the {headers} as an argument?
other-emerald
other-emerald4mo ago
No description
sensitive-blue
sensitive-blueOP4mo ago
That worked. Thank you.

Did you find this page helpful?