Add OPENID_HTTP_VERIFY_SSL_PEER env var to disable ssl cert verification

Closes #479
This commit is contained in:
Bubka 2025-06-03 09:43:25 +02:00
parent 7644306609
commit 44f94d6770
5 changed files with 15 additions and 1 deletions

View File

@ -252,6 +252,9 @@ WEBAUTHN_USER_VERIFICATION=preferred
# OPENID_USERINFO_URL=
# OPENID_CLIENT_ID=
# OPENID_CLIENT_SECRET=
# OPENID_HTTP_VERIFY_SSL_PEER=true
# Can also be the path to a custom certificate on disk, i.e
# OPENID_HTTP_VERIFY_SSL_PEER=/path/to/cert.pem
# GITHUB_CLIENT_ID=
# GITHUB_CLIENT_SECRET=

4
Dockerfile vendored
View File

@ -227,6 +227,10 @@ ENV \
# OPENID_USERINFO_URL= \
# OPENID_CLIENT_ID= \
# OPENID_CLIENT_SECRET= \
# OPENID_HTTP_VERIFY_SSL_PEER=true \
# Can also be the path to a custom certificate on disk, i.e
# OPENID_HTTP_VERIFY_SSL_PEER=/path/to/cert.pem \
#
# GITHUB_CLIENT_ID= \
# GITHUB_CLIENT_SECRET= \
# Use this setting to declare trusted proxied.

View File

@ -15,7 +15,7 @@ if (! function_exists('envUnlessEmpty')) {
/**
* @return mixed|null
*/
function envUnlessEmpty(string $key, string|int|bool|float|null $default = null)
function envUnlessEmpty(string $key, string|int|bool|float|array|null $default = null)
{
$result = env($key, $default);
if ('' === $result) {

View File

@ -28,6 +28,9 @@ return [
'client_id' => env('OPENID_CLIENT_ID'),
'client_secret' => env('OPENID_CLIENT_SECRET'),
'redirect' => env('APP_URL') . '/socialite/callback/openid',
'guzzle' => [
'verify' => envUnlessEmpty('OPENID_HTTP_VERIFY_SSL_PEER', true), // https://docs.guzzlephp.org/en/stable/request-options.html#verify
]
],
'github' => [

View File

@ -124,6 +124,10 @@ services:
# - OPENID_USERINFO_URL=
# - OPENID_CLIENT_ID=
# - OPENID_CLIENT_SECRET=
# - OPENID_HTTP_VERIFY_SSL_PEER=true
# Can also be the path to a custom certificate on disk, i.e
# - OPENID_HTTP_VERIFY_SSL_PEER=/path/to/cert.pem
#
# - GITHUB_CLIENT_ID=
# - GITHUB_CLIENT_SECRET=
# Use this setting to declare trusted proxied.