gracefully handle a non-existant anti-forgery meta tag
This commit is contained in:
parent
f7f4635747
commit
30535a8c60
|
@ -108,7 +108,8 @@
|
|||
:on-send (get-handlers middleware :on-send)}))
|
||||
|
||||
(defn- get-anti-forgery-token []
|
||||
(.-content (sel1 "meta[name='anti-forgery-token']")))
|
||||
(if-let [tag (sel1 "meta[name='anti-forgery-token']")]
|
||||
(.-content tag)))
|
||||
|
||||
(defn init!
|
||||
"Sets up browserchannel for use, creating a handler with the specified
|
||||
|
|
Reference in a new issue