Allow configuring the application's domain name #2543
Merged
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.
This PR allows setting the
DOMAIN_NAME
environment variable, which configures the domain name used in absolute URLs returned by the application, for example in emails or Cargo responses.The scenario that prompted this change is when an user creates an account on the staging instance: before this PR the link they'd get in the verification email was invalid, as the production application doesn't know staging's email verification codes.
If the variable is omitted the domain will default to "crates.io".
r? @jtgeibel