You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
overseerr/server/utils/restartFlag.ts

24 lines
544 B

import type { MainSettings } from '../lib/settings';
import { getSettings } from '../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
);
}
}
const restartFlag = new RestartFlag();
export default restartFlag;