provide a SANE default in case httpUnsafeOrigin is not provided

pull/1/head
ansuz 6 years ago
parent bcbec0144c
commit 1629d7bb1d

@ -107,7 +107,7 @@ define([
// if we want to make CryptPad work in server subfolders, we'll need // if we want to make CryptPad work in server subfolders, we'll need
// to update this path derivation // to update this path derivation
return (typeof(ApiConfig.httpUnsafeOrigin) !== 'undefined'? return (typeof(ApiConfig.httpUnsafeOrigin) !== 'undefined'?
ApiConfig.httpUnsafeOrigin: window.location.origin) ApiConfig.httpUnsafeOrigin: window.location.origin + '/')
+ 'block/' + publicKey.slice(0, 2) + '/' + publicKey; + 'block/' + publicKey.slice(0, 2) + '/' + publicKey;
}; };

Loading…
Cancel
Save