mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-13 11:54:34 +00:00
Add ability to opt-out dh param auto generation
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
# The first argument is the bit depth of the dhparam, or 2048 if unspecified
|
||||
DHPARAM_BITS=${1:-2048}
|
||||
GENERATE_DHPARAM=${2:-true}
|
||||
|
||||
# If a dhparam file is not available, use the pre-generated one and generate a new one in the background.
|
||||
# Note that /etc/nginx/dhparam is a volume, so this dhparam will persist restarts.
|
||||
@ -25,6 +26,11 @@ if [[ -f $DHPARAM_FILE ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $GENERATE_DHPARAM =~ ^[Ff][Aa][Ll][Ss][Ee]$ ]]; then
|
||||
echo "Skipping Diffie-Hellman parameters generation and Ignoring pre-generated dhparam.pem"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat >&2 <<-EOT
|
||||
WARNING: $DHPARAM_FILE was not found. A pre-generated dhparam.pem will be used for now while a new one
|
||||
is being generated in the background. Once the new dhparam.pem is in place, nginx will be reloaded.
|
||||
|
Reference in New Issue
Block a user