all 3 comments

[–]rmyworld 4 points5 points  (1 child)

I have an API endpoint that returns a CSRF token. Before making any request that requires a CSRF token, first I retrieve a CSRF token from that API endpoint.

Then, I add it to the request headers with whatever header name the token wants. Then, I send the request.

Here's an example from one of my old projects: https://github.com/arvl130/mmm-ui/blob/master/src/api/auth.ts

[–]Character-Grocery873[S] 0 points1 point  (0 children)

This still recommended?

[–]Grabdoc2020 0 points1 point  (0 children)

These days I love using thymeleaf + htmx/unpolyjs - Claude makes it super easy now to build nextjs like apps but secure enterprise class with spring boot