mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 04:22:48 +03:00
urb.js safety
This commit is contained in:
parent
259311f205
commit
fdad073040
@ -14,6 +14,7 @@ window.urb.req = function(method,url,params,json,cb) {
|
||||
if(json)
|
||||
xhr.setRequestHeader("content-type", "text/json")
|
||||
|
||||
if(!window.urb.oryx) throw "No CSRF token" // XX fetch auth.json
|
||||
_data = {oryx: window.urb.oryx}
|
||||
if(params.xyro) { _data.xyro = params.xyro; }
|
||||
if(params.ship) { _data.ship = params.ship; }
|
||||
|
Loading…
Reference in New Issue
Block a user