Closed lrosso closed 6 years ago
The first question that needs to be answered is: do you need protection from CSRF attacks or not for your POST
routes?
As you're using JWS authentication it's likely that you don't, however you'll need to make that call yourself.
If you don't need it, then you can just turn it off with:
:duct.middleware.web/defaults
{:security {:anti-forgery false}}
If you do need it, then read through the documentation for Ring-Anti-Forgery to get an idea of how to use it.
Hi James,
anti-forgery desabled, endpoints responding ok again.
Thank you very much.
Luis
Hi,
I guess this issue might be related with issue #10
As it has just got closed, I'd rather open this new one instead of going on with that other one.
As issue reported there got fixed thanks to suggestions supplied, issue reported here arose: as I try to access a couple POST endpoints by means of Postman, I get the following error reported:
<h1>invalid anti-forgery token</h1>
Immediately before implementing fix suggested in previous issue, I had been able to access both endpoints successfully.
Solutions found so far seem too fragmentary, at least for a beginner in Duct like me...
Or out-dated: I arrive to that conclusion as Component is mentioned there which, as far as I know, has been replaced by Immutant in Duct's current version.
Full current version of edn config shown below; what's wrong with it? How should I fix it?
Thanks in advance !
Luis