Skip to content

Commit bdf9160

Browse files
jaycollettKodeStar
authored andcommitted
Add global TLS verification skip setting
Adds a new boolean setting in the Advanced settings group that allows users to globally skip TLS certificate verification for all enhanced apps. This is useful for users who have self-signed certificates on their services. When enabled, the Guzzle HTTP client will set 'verify' => false for all API requests made by enhanced apps. Resolves linuxserver/Heimdall-Apps#687
1 parent 3f483c9 commit bdf9160

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎app/SupportedApps.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ public function execute(
8585
'connect_timeout' => 15,
8686
] : $overridevars;
8787

88+
// Check global setting to skip TLS verification (useful for self-signed certificates)
89+
if (Setting::fetch('skip_tls_verification')) {
90+
$vars['verify'] = false;
91+
}
92+
8893
$client = new Client($vars);
8994

9095
$method = ($overridemethod === null || $overridemethod === false) ? $this->method : $overridemethod;

‎database/seeders/SettingsSeeder.php‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,5 +364,19 @@ public function run(): void
364364
$setting->label = 'app.settings.default_tag';
365365
$setting->save();
366366
}
367+
368+
if (! $setting = Setting::find(16)) {
369+
$setting = new Setting;
370+
$setting->id = 16;
371+
$setting->group_id = 4;
372+
$setting->key = 'skip_tls_verification';
373+
$setting->type = 'boolean';
374+
$setting->label = 'app.settings.skip_tls_verification';
375+
$setting->value = '0';
376+
$setting->save();
377+
} else {
378+
$setting->label = 'app.settings.skip_tls_verification';
379+
$setting->save();
380+
}
367381
}
368382
}

‎lang/en/app.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'settings.folders' => 'Folders',
3434
'settings.tags' => 'Tags',
3535
'settings.categories' => 'Categories',
36+
'settings.skip_tls_verification' => 'Skip TLS Verification (for self-signed certificates)',
3637
'options.none' => '- not set -',
3738
'options.google' => 'Google',
3839
'options.ddg' => 'DuckDuckGo',

0 commit comments

Comments
 (0)