mirror of
https://github.com/sct/overseerr.git
synced 2025-12-27 00:34:56 +01:00
* feat: add a proxy option into settings * feat: add a proxy option into settings * fix: use undici proxy agent
25 lines
610 B
TypeScript
25 lines
610 B
TypeScript
import type { MainSettings } from '@server/lib/settings';
|
|
import { getSettings } from '@server/lib/settings';
|
|
|
|
class RestartFlag {
|
|
private settings: MainSettings;
|
|
|
|
public initializeSettings(settings: MainSettings): void {
|
|
this.settings = { ...settings };
|
|
}
|
|
|
|
public isSet(): boolean {
|
|
const settings = getSettings().main;
|
|
|
|
return (
|
|
this.settings.csrfProtection !== settings.csrfProtection ||
|
|
this.settings.trustProxy !== settings.trustProxy ||
|
|
this.settings.httpProxy !== settings.httpProxy
|
|
);
|
|
}
|
|
}
|
|
|
|
const restartFlag = new RestartFlag();
|
|
|
|
export default restartFlag;
|