mirror of
https://github.com/sct/overseerr.git
synced 2025-12-27 16:46:29 +01:00
* feat(settings): add settings for custom DNS servers and IPv4 resolution first This PR adds settings to change the DNS servers Jellyseerr uses and to force Jellyseerr to resolve DNS queries using IPv4 first. These settings aim to make it easier for less experienced users to fix network errors related to DNS resolution. * style: fix missing newline
27 lines
742 B
TypeScript
27 lines
742 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.proxy.enabled !== settings.proxy.enabled ||
|
|
this.settings.forceIpv4First !== settings.forceIpv4First ||
|
|
this.settings.dnsServers !== settings.dnsServers
|
|
);
|
|
}
|
|
}
|
|
|
|
const restartFlag = new RestartFlag();
|
|
|
|
export default restartFlag;
|