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() {
const headers = super.getHeaders();
if (this.app) {
headers['X-App'] = this.app.getName();
const appName = this.app.getName();
if (appName) {
headers['X-App'] = appName;
}
headers['X-Timezone'] = getCurrentTimezone();
headers['X-Hostname'] = window?.location?.hostname;