|
|
|
@ -61,7 +61,7 @@ export class BaseAPI {
|
|
|
|
|
'X-Requested-With': 'XMLHttpRequest',
|
|
|
|
|
...options.headers
|
|
|
|
|
};
|
|
|
|
|
if ((window as any)?.isGristBootPage) {
|
|
|
|
|
if (typeof window !== 'undefined' && (window as any)?.isGristBootPage) {
|
|
|
|
|
const parts = (new URL(window.location.href).pathname).split('/');
|
|
|
|
|
if (parts[0] === '' && parts[1] === 'boot' && parts[2] !== undefined) {
|
|
|
|
|
this._headers['X-Boot-Key'] = parts[2];
|
|
|
|
|