Files
jellyseerr/server/utils/restartFlag.ts
Gauthier ada467ecf4 fix(settings): remove dns server option (#1416)
* fix(settings): remove dns server option

This PR removes the DNS Servers option added in #1266 because it doesn't seem to work reliably.

* style: remove whitespace change
2025-03-02 22:53:43 +01:00

29 lines
845 B
TypeScript

import type { AllSettings, NetworkSettings } from '@server/lib/settings';
import { getSettings } from '@server/lib/settings';
class RestartFlag {
private networkSettings: NetworkSettings;
public initializeSettings(settings: AllSettings): void {
this.networkSettings = {
...settings.network,
proxy: { ...settings.network.proxy },
};
}
public isSet(): boolean {
const networkSettings = getSettings().network;
return (
this.networkSettings.csrfProtection !== networkSettings.csrfProtection ||
this.networkSettings.trustProxy !== networkSettings.trustProxy ||
this.networkSettings.proxy.enabled !== networkSettings.proxy.enabled ||
this.networkSettings.forceIpv4First !== networkSettings.forceIpv4First
);
}
}
const restartFlag = new RestartFlag();
export default restartFlag;