diff options
Diffstat (limited to 'Docker')
| -rw-r--r-- | Docker/FreshRSS.Apache.conf | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Docker/FreshRSS.Apache.conf b/Docker/FreshRSS.Apache.conf index e5576ac8f..0f9b8e3fa 100644 --- a/Docker/FreshRSS.Apache.conf +++ b/Docker/FreshRSS.Apache.conf @@ -15,6 +15,11 @@ TraceEnable Off Error "The auth_openidc_module is not available. Install it or unset environment variable OIDC_ENABLED." </IfModule> + # Workaround to be able to check whether an environment variable is set + # See: https://serverfault.com/questions/1022233/using-ifdefine-with-environment-variables/1022234#1022234 + Define VStart "${" + Define VEnd "}" + OIDCProviderMetadataURL ${OIDC_PROVIDER_METADATA_URL} OIDCClientID ${OIDC_CLIENT_ID} OIDCClientSecret ${OIDC_CLIENT_SECRET} @@ -22,8 +27,20 @@ TraceEnable Off OIDCRedirectURI /i/oidc/ OIDCCryptoPassphrase ${OIDC_CLIENT_CRYPTO_KEY} - OIDCRemoteUserClaim preferred_username - OIDCScope "openid" + Define "Test_${OIDC_REMOTE_USER_CLAIM}" + <IfDefine Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}> + OIDCRemoteUserClaim preferred_username + </IfDefine> + <IfDefine !Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}> + OIDCRemoteUserClaim "${OIDC_REMOTE_USER_CLAIM}" + </IfDefine> + Define "Test_${OIDC_SCOPES}" + <IfDefine Test_${VStart}OIDC_SCOPES${VEnd}> + OIDCScope openid + </IfDefine> + <IfDefine !Test_${VStart}OIDC_SCOPES${VEnd}> + OIDCScope "${OIDC_SCOPES}" + </IfDefine> OIDCRefreshAccessTokenBeforeExpiry 30 </IfDefine> |
