Skip to content

Allow configuring the application's domain name #2543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

pietroalbini
Copy link
Member

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

@pietroalbini
Copy link
Member Author

Fixed the formatting.

@jtgeibel
Copy link
Member

Looks like there are some files failing because Arc or App aren't in scope. Looks good to me other than that.

@pietroalbini pietroalbini force-pushed the staging-mail-domain branch from 00d3a44 to b3c231a Compare June 12, 2020 10:04
@pietroalbini
Copy link
Member Author

How did I even miss that :/

This commit 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 commit 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".
@pietroalbini pietroalbini force-pushed the staging-mail-domain branch from b3c231a to 4d02890 Compare June 12, 2020 10:27
@pietroalbini
Copy link
Member Author

@bors r=jtgeibel

@bors
Copy link
Contributor

bors commented Jun 12, 2020

📌 Commit 4d02890 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Jun 12, 2020

⌛ Testing commit 4d02890 with merge dad339f...

@bors
Copy link
Contributor

bors commented Jun 12, 2020

☀️ Test successful - checks-travis
Approved by: jtgeibel
Pushing dad339f to master...

@bors bors merged commit dad339f into rust-lang:master Jun 12, 2020
@pietroalbini pietroalbini deleted the staging-mail-domain branch June 12, 2020 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants