Fork me on GitHub
#biff
<
2022-11-29
>
Lyn Headley12:11:49

Made some crud routes!

😀 1
👍 1
Lyn Headley13:11:00

Does invalid anti-forgery token mean I need to log in again?

Lyn Headley13:11:51

I get that error for post routes but not for gets. Logging in again does not help.

Lyn Headley13:11:37

Seeing the middleware document string now

Lyn Headley13:11:58

Got to go to work now will fix later

Lyn Headley14:11:49

Looks like eelchat solves it with an hx header for all hx requests.

Lyn Headley14:11:52

I guess I should just use HX for all posts

Jacob O'Bryant15:11:38

yes, the error most likely means the anti forgery token isn't being included in the request at all. for non-htmx posts, you can use biff/form which inserts the token into a hidden input field .

Lyn Headley16:11:30

Thanks.

👌 1