handle absent trailing slashes in config for checkup page

pull/1/head
ansuz 2021-03-18 12:26:05 +05:30
parent bced36b2f8
commit 163b870f92
1 changed files with 5 additions and 1 deletions

View File

@ -43,7 +43,11 @@ define([
}, _alert('Sandbox configuration: httpUnsafeOrigin !== httpSafeOrigin'));
assert(function (cb) {
cb((window.location.origin + '/') === ApiConfig.httpUnsafeOrigin);
var origin = window.location.origin;
return void cb([
origin,
origin + '/'
].indexOf(ApiConfig.httpUnsafeOrigin) !== -1);
}, _alert('Sandbox configuration: loading via httpUnsafeOrigin'));