diff --git a/src/client.ts b/src/client.ts index bfd86a85..daabc813 100644 --- a/src/client.ts +++ b/src/client.ts @@ -102,11 +102,12 @@ export class Client { // cut trailing slash if needed this.url = this.url.replace(/\/$/, ''); + this.headers = { + 'Content-Type': 'application/json', + }; + if (typeof version === 'string') { - // set header to tell proxy to select the correct backend - this.headers = { - 'X-StApps-Version': this.version, - }; + this.headers['X-StApps-Version'] = this.version; } }