stricter tests for the sandbox checkup

pull/1/head
ansuz 4 years ago
parent b4adf0ac4a
commit f6f90712af

@ -42,12 +42,13 @@ define([
return void cb(trimmedSafe !== trimmedUnsafe);
}, _alert('Sandbox configuration: httpUnsafeOrigin !== httpSafeOrigin'));
assert(function (cb) {
cb(trimmedSafe === ApiConfig.httpSafeOrigin);
}, "httpSafeOrigin must not have a trailing slash");
assert(function (cb) {
var origin = window.location.origin;
return void cb([
origin,
origin + '/'
].indexOf(ApiConfig.httpUnsafeOrigin) !== -1);
return void cb(ApiConfig.httpUnsafeOrigin === origin);
}, _alert('Sandbox configuration: loading via httpUnsafeOrigin'));

Loading…
Cancel
Save