|
@@ -95,7 +95,7 @@ function cancelQuery(query) {
|
|
|
var path = Routes.cancel_queries_path()
|
|
|
var data = {run_id: query.run_id, data_source: query.data_source}
|
|
|
if (navigator.sendBeacon) {
|
|
|
- navigator.sendBeacon(path, csrfProtect(data))
|
|
|
+ navigator.sendBeacon(path + "?" + $.param(csrfProtect(data)))
|
|
|
} else {
|
|
|
// TODO make sync
|
|
|
$.post(path, data)
|
|
@@ -106,5 +106,5 @@ function csrfProtect(payload) {
|
|
|
var param = $("meta[name=csrf-param]").attr("content")
|
|
|
var token = $("meta[name=csrf-token]").attr("content")
|
|
|
if (param && token) payload[param] = token
|
|
|
- return new Blob([JSON.stringify(payload)], {type : "application/json; charset=utf-8"})
|
|
|
+ return payload
|
|
|
}
|