provide a SANE default in case httpUnsafeOrigin is not provided

This commit is contained in:
ansuz 2018-07-17 16:31:15 +02:00
parent bcbec0144c
commit 1629d7bb1d

View File

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