Hello, I need an API for my Blitz app. I can't quite figure out this tutorial: https://blitzjs.com/docs/session-management#manual-api-requests
Where exactly should I set antiCSRFToken? What is the variable "header"? External apps should be able to send an arbitrary string to a backend route of my app without authentication.
I created a file "app/core/mutations/myRequest.ts" with this content:
`import { resolver } from "@blitzjs/rpc"
import { Ctx } from "blitz".
export default resolver.pipe(
async (request: string, ctx: Ctx) => {
await processRequest(request)
return { status: "done" }
}
)`
However, when I send a post request to http://localhost:3000/api/rpc/myRequest with postman I get this error:
{ "name": "CSRFTokenMismatchError", "statusCode": 401 }