Skip to content

Commit 9443ce4

Browse files
committed
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 7861ae1 commit 9443ce4

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

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
@@ -349,5 +349,19 @@ public function run(): void
349349
$setting->label = 'app.settings.treat_tags_as';
350350
$setting->save();
351351
}
352+
353+
if (! $setting = Setting::find(15)) {
354+
$setting = new Setting;
355+
$setting->id = 15;
356+
$setting->group_id = 4;
357+
$setting->key = 'skip_tls_verification';
358+
$setting->type = 'boolean';
359+
$setting->label = 'app.settings.skip_tls_verification';
360+
$setting->value = '0';
361+
$setting->save();
362+
} else {
363+
$setting->label = 'app.settings.skip_tls_verification';
364+
$setting->save();
365+
}
352366
}
353367
}

lang/en/app.php

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

0 commit comments

Comments
 (0)