ring

Endre Bakken Stovner 2021-06-16T13:13:31.019300Z

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 Stovner 2021-06-16T13:14:57.020600Z

I have this home-routes definition:

(defn home-routes []
  [""
   {:middleware [middleware/wrap-csrf
                 middleware/wrap-formats]}
   ["/" {: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?