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

Config values can be overwritten #6

Open
MisinformedDNA opened this issue Sep 10, 2020 · 0 comments
Open

Config values can be overwritten #6

MisinformedDNA opened this issue Sep 10, 2020 · 0 comments

Comments

@MisinformedDNA
Copy link
Owner

I noticed that user secrets were being overridden by local.settings.json. I did some research and here's how it happens:

The Azure Functions SDK sets the default configuration before this library can make it's changes. As such, all settings in the default configuration are added as environment variables.

After that is done, this library adds its own configuration values in the order of user secrets followed by environment variables. So if the environment variable is blank in the initial config, then the environments can just override what the user secrets just set.

For instance:

// local.settings.json
{
  "Secret": ""
}

```json
// secrets.json
{
  "Secret": "lsdkfdlds"
  "Password": "Passw0rd"
}

then environment values will end up with

Secret: ""
Password: "Passdw0rd"

This will be a breaking change so this will be done in a new version.
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

No branches or pull requests

1 participant