Skip to content
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

Support default values for placeholders #3974

Closed
dunglas opened this issue Jan 14, 2021 · 1 comment
Closed

Support default values for placeholders #3974

dunglas opened this issue Jan 14, 2021 · 1 comment
Labels
duplicate 🖇️ This issue or pull request already exists feature ⚙️ New feature or request good first issue 🐤 Good for newcomers

Comments

@dunglas
Copy link
Collaborator

dunglas commented Jan 14, 2021

#3682 introduced support for env var defaults in Caddyfile, which is awesome! It would be nice to support default values in env.* placeholders too.

For instance, I have the following use case:

    mercure {
        # Transport to use (default to Bolt)
        transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db}
     }

The MERCURE_TRANSPORT_URL env var may contain sensitive data (such as passwords). Using runtime env var would be a bit more secure than the current situation where the content of the password is stored in the internal config, but it's currently not possible (AFAIK) because it's not possible to set a default value for these env vars.

@francislavoie francislavoie added feature ⚙️ New feature or request good first issue 🐤 Good for newcomers labels Jan 14, 2021
@francislavoie francislavoie added this to the 2.x milestone Jan 14, 2021
@mholt
Copy link
Member

mholt commented Jan 14, 2021

I think this is a duplicate of #1793.

As such, I'm going to close this, but your comment is duly noted and I bet it can be done without too much difficulty.

@mholt mholt added the duplicate 🖇️ This issue or pull request already exists label Jan 14, 2021
@mholt mholt closed this as completed Jan 16, 2021
@mholt mholt removed this from the 2.x milestone Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate 🖇️ This issue or pull request already exists feature ⚙️ New feature or request good first issue 🐤 Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants