Change dhparam positional args to be inherited vars, standardize naming#1263
Merged
buchdag merged 3 commits intonginx-proxy:mainfrom Apr 29, 2021
Merged
Change dhparam positional args to be inherited vars, standardize naming#1263buchdag merged 3 commits intonginx-proxy:mainfrom
buchdag merged 3 commits intonginx-proxy:mainfrom
Conversation
Contributor
Member
|
@jwilder this is a required fix, could you merge please ? |
joren485
suggested changes
Jan 29, 2020
There was a problem hiding this comment.
I believe with this change
# Generate dhparam file if required
# Note: if $DHPARAM_BITS is not defined, generate-dhparam.sh will use 2048 as a default
# Note2: if $DHPARAM_GENERATION is set to false in environment variable, dh param generator will skip completely
/app/generate-dhparam.sh $DHPARAM_BITS $DHPARAM_GENERATION
should be changed to
# Generate dhparam file if required
/app/generate-dhparam.sh
in entrypoint.sh.
PR nginx-proxy#913 added `DHPARAM_GENERATION` as a positional argument to generate-dhparam.sh. However, since it was the second positional argument, `DHPARAM_BITS` would also have to be defined or `DHPARAM_GENERATION` would be read into `DHPARAM_BITS`. This changes the arguments to be inherited variables which do not depend on order, just declaration. Also change instances of `GENERATE_DHPARAM` to `DHPARAM_GENERATION` since it's unnecessary to have another variable. I think `GENERATE_DHPARAM` is actually a better name (verb vs. noun), but `DHPARAM_GENERATION` is already defined and may break someone if changed. Addresses nginx-proxy#913 (comment)
7223710 to
ab81ff8
Compare
Member
|
This was
linked to
issues
Apr 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #913 added
DHPARAM_GENERATIONas a positional argument to generate-dhparam.sh. However, since it was the second positional argument,DHPARAM_BITSwould also have to be defined orDHPARAM_GENERATIONwould be read intoDHPARAM_BITS. This changes the arguments to be inherited variables which do not depend on order, just declaration.Also change instances of
GENERATE_DHPARAMtoDHPARAM_GENERATIONsince it's unnecessary to have another variable. I thinkGENERATE_DHPARAMis actually a better name (verb vs. noun), butDHPARAM_GENERATIONis already defined and may break someone if changed.Addresses #913 (comment)
Behavior before:
Behavior after: