Currently setting up CSRF token for POST requests with Ring. I've been following answer to this question as a guide Set Ring-Anti-Forgery CSRF header token. After following this guide I am able to successfully get the csrf token and send a POST request with curl. However, I can only do this at the expense of not using (wrap-reload) with my app handler.
The guide uses this code for the app handler
(def app
(-> routes
(wrap-defaults site-defaults)
(wrap-session)))
However, in order to use dynamic reloading I need the (wrap-reload) function during development. Like so,
(def app
(-> routes
(wrap-defaults site-defaults)
(wrap-session)
(wrap-exception)
(wrap-reload)))
I'm pretty sure this is related to a problem addressed by comments in answer for question I linked above. There was a bug creating redundant behavior with setting the middleware defaults.
Is there anyway I can use wrap-reload and still get valid CSRF tokens?