mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-08-07 07:16:13 +00:00
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
This commit is contained in:
@@ -85,6 +85,11 @@ abstract class SupportedApps
|
|||||||
'connect_timeout' => 15,
|
'connect_timeout' => 15,
|
||||||
] : $overridevars;
|
] : $overridevars;
|
||||||
|
|
||||||
|
// Check global setting to skip TLS verification (useful for self-signed certificates)
|
||||||
|
if (Setting::fetch('skip_tls_verification')) {
|
||||||
|
$vars['verify'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
$client = new Client($vars);
|
$client = new Client($vars);
|
||||||
|
|
||||||
$method = ($overridemethod === null || $overridemethod === false) ? $this->method : $overridemethod;
|
$method = ($overridemethod === null || $overridemethod === false) ? $this->method : $overridemethod;
|
||||||
|
|||||||
@@ -364,5 +364,19 @@ class SettingsSeeder extends Seeder
|
|||||||
$setting->label = 'app.settings.default_tag';
|
$setting->label = 'app.settings.default_tag';
|
||||||
$setting->save();
|
$setting->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $setting = Setting::find(16)) {
|
||||||
|
$setting = new Setting;
|
||||||
|
$setting->id = 16;
|
||||||
|
$setting->group_id = 4;
|
||||||
|
$setting->key = 'skip_tls_verification';
|
||||||
|
$setting->type = 'boolean';
|
||||||
|
$setting->label = 'app.settings.skip_tls_verification';
|
||||||
|
$setting->value = '0';
|
||||||
|
$setting->save();
|
||||||
|
} else {
|
||||||
|
$setting->label = 'app.settings.skip_tls_verification';
|
||||||
|
$setting->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ return array (
|
|||||||
'settings.folders' => 'Folders',
|
'settings.folders' => 'Folders',
|
||||||
'settings.tags' => 'Tags',
|
'settings.tags' => 'Tags',
|
||||||
'settings.categories' => 'Categories',
|
'settings.categories' => 'Categories',
|
||||||
|
'settings.skip_tls_verification' => 'Skip TLS Verification (for self-signed certificates)',
|
||||||
'options.none' => '- not set -',
|
'options.none' => '- not set -',
|
||||||
'options.google' => 'Google',
|
'options.google' => 'Google',
|
||||||
'options.ddg' => 'DuckDuckGo',
|
'options.ddg' => 'DuckDuckGo',
|
||||||
|
|||||||
Reference in New Issue
Block a user