mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
feat: add content-type header
This commit is contained in:
@@ -102,11 +102,12 @@ export class Client {
|
|||||||
// cut trailing slash if needed
|
// cut trailing slash if needed
|
||||||
this.url = this.url.replace(/\/$/, '');
|
this.url = this.url.replace(/\/$/, '');
|
||||||
|
|
||||||
if (typeof version === 'string') {
|
|
||||||
// set header to tell proxy to select the correct backend
|
|
||||||
this.headers = {
|
this.headers = {
|
||||||
'X-StApps-Version': this.version,
|
'Content-Type': 'application/json',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (typeof version === 'string') {
|
||||||
|
this.headers['X-StApps-Version'] = this.version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user