Allow users to manually whitelist Domains for use in themes (#3476)

This commit is contained in:
Vending Machine 2025-06-12 02:19:45 +02:00 committed by GitHub
parent 7f2c4a3566
commit ed5ed4b80a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 313 additions and 46 deletions

View file

@ -49,16 +49,18 @@ export interface NativeSettings {
[setting: string]: any;
};
};
customCspRules: Record<string, string[]>;
}
const DefaultNativeSettings: NativeSettings = {
plugins: {}
plugins: {},
customCspRules: {}
};
const nativeSettings = readSettings<NativeSettings>("native", NATIVE_SETTINGS_FILE);
mergeDefaults(nativeSettings, DefaultNativeSettings);
export const NativeSettings = new SettingsStore(nativeSettings);
export const NativeSettings = new SettingsStore(nativeSettings as NativeSettings);
NativeSettings.addGlobalChangeListener(() => {
try {