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.
24 lines
544 B
24 lines
544 B
2 years ago
|
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;
|