mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
Compare commits
1 Commits
4e9ba75377
...
preview-fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a100de2ec |
@@ -1,3 +1,5 @@
|
|||||||
|
import { MediaServerType } from '@server/constants/server';
|
||||||
|
import { getSettings } from '@server/lib/settings';
|
||||||
import type { RateLimitOptions } from '@server/utils/rateLimit';
|
import type { RateLimitOptions } from '@server/utils/rateLimit';
|
||||||
import rateLimit from '@server/utils/rateLimit';
|
import rateLimit from '@server/utils/rateLimit';
|
||||||
import type NodeCache from 'node-cache';
|
import type NodeCache from 'node-cache';
|
||||||
@@ -34,6 +36,8 @@ class ExternalAPI {
|
|||||||
|
|
||||||
const url = new URL(baseUrl);
|
const url = new URL(baseUrl);
|
||||||
|
|
||||||
|
const settings = getSettings();
|
||||||
|
|
||||||
this.defaultHeaders = {
|
this.defaultHeaders = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
@@ -42,6 +46,9 @@ class ExternalAPI {
|
|||||||
`${url.username}:${url.password}`
|
`${url.username}:${url.password}`
|
||||||
).toString('base64')}`,
|
).toString('base64')}`,
|
||||||
}),
|
}),
|
||||||
|
...(settings.main.mediaServerType === MediaServerType.EMBY && {
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
}),
|
||||||
...options.headers,
|
...options.headers,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user