graffiti
graffiti copied to clipboard
Add CSRF token to GraphiQL view
This change adds a getCSRFToken
method that if provided can be invoked with the request
to get a CSRF token for example: req.csrfToken()
.
This is needed for securing the GraphiQL views (especially on production instances!). I'm using a modified version of this in development to allow my csrf strategy to work. Let me know what you think!
Thanks for the PR! Can you add support for the other frameworks too (koa, hapi)?
@tothandras I'll look at these other frameworks soon
any updates on this?
@phra sorry for the delay. I don't have time to work on this anymore, as I've moved on to using another library. Perhaps someone else is interested in taking this to the finish line by implementing @tothandras' request to add koa and hapi support?
@cellis which library are you using? i'm using this one right now.