Closed endrebak closed 4 years ago
Hi Endre! You can turn off the CSRF check with a nil :csrf-token-fn
argument passed to socket-server!
. You can see that fn's docstring for more info.
Would recommend against that though; adding a CSRF is quite easy- you can see an example of how this is done in the example project.
Hope that helps! Best of luck :-)
Thanks! I dunno if there is any point in a CSRF token for a same machine app though: I will need to read up on it :)
Hi, I tried this, but there is still this error message in the js/console...
(defstate socket
:start (sente/make-channel-socket!
(get-sch-adapter)
{:csrf-token-fn nil
:user-id-fn (fn [ring-req]
(get-in ring-req [:parameters :query :client-id]))}))
I am getting the warning in the console log:
and later, unsurprisingly it says:
I do not know what I doing, but I am guessing these two are related. I am just testing out sente for now. How do I turn off the CSRF check?