fix: appName

This commit is contained in:
chenos 2024-04-28 14:51:18 +08:00
parent 0541ee36e6
commit 674093e84c

View File

@ -54,8 +54,9 @@ export class APIClient extends APIClientSDK {
getHeaders() { getHeaders() {
const headers = super.getHeaders(); const headers = super.getHeaders();
if (this.app) { const appName = this.app.getName();
headers['X-App'] = this.app.getName(); if (appName) {
headers['X-App'] = appName;
} }
headers['X-Timezone'] = getCurrentTimezone(); headers['X-Timezone'] = getCurrentTimezone();
headers['X-Hostname'] = window?.location?.hostname; headers['X-Hostname'] = window?.location?.hostname;