fix spreadsheet CSP checkup and confirm that /api/broadcast is accessible

This commit is contained in:
ansuz 2021-04-12 17:49:22 +05:30
parent 15d6f573e7
commit 1ee2f70f49
1 changed files with 12 additions and 1 deletions

View File

@ -210,7 +210,7 @@ define([
};
$.ajax(url, {
success: function (data, textStatus, xhr) {
complete: function (xhr) {
cb(!Object.keys(expect).some(function (k) {
var response = xhr.getResponseHeader(k);
console.log(k, response);
@ -220,6 +220,17 @@ define([
});
}, _alert("Missing HTTP headers required for XLSX export"));
assert(function (cb) {
cb(true);
$.ajax('/api/broadcast', {
dataType: 'text',
complete: function (xhr) {
console.log(xhr);
cb(xhr.status === 200);
},
});
}, _alert("/api/broadcast is not available"));
var row = function (cells) {
return h('tr', cells.map(function (cell) {
return h('td', cell);