Fork me on GitHub
Endre Bakken Stovner13:06:31

If I want to communicate with my web-server by sending JSON from the command line using curl POST requests, how would I get the correct CSRF-token?

Endre Bakken Stovner13:06:57

I have this home-routes definition:

(defn home-routes []
   {:middleware [middleware/wrap-csrf
   ["/" {:get home-page}]
   ["/json" {:post #(constantly "json")}]
I can only know the CSRF token from webpages served to me, right? Then how could I automatically get it from my server?