diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-12-01 09:22:57 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-12-01 09:22:57 -0600 |
| commit | 2c856e441c57623d5a4fa157a803b589416629e6 (patch) | |
| tree | 0041f807a8ec0b4a539d1ecdac258596a3242357 | |
| parent | 49c16a917cfa58ab9647d59dec5cccde7026a1f7 (diff) | |
| download | slskd-2c856e441c57623d5a4fa157a803b589416629e6.tar.gz | |
default remote configuration to false again
| -rw-r--r-- | config/slskd.example.yml | 2 | ||||
| -rw-r--r-- | src/slskd/Core/API/Controllers/OptionsController.cs | 4 | ||||
| -rw-r--r-- | src/slskd/Options.cs | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 73278cff..16b1188e 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -4,7 +4,7 @@ # no_connect: false # no_share_scan: false # no_version_check: false -# no_remote_configuration: false +# remote_configuration: false # instance_name: default # directories: # incomplete: ~ diff --git a/src/slskd/Core/API/Controllers/OptionsController.cs b/src/slskd/Core/API/Controllers/OptionsController.cs index aa5ffc3a..60237878 100644 --- a/src/slskd/Core/API/Controllers/OptionsController.cs +++ b/src/slskd/Core/API/Controllers/OptionsController.cs @@ -86,7 +86,7 @@ namespace slskd.Core.API [Route("yaml")] public IActionResult GetYamlFile() { - if (!OptionsSnapshot.Value.NoRemoteConfiguration) + if (!OptionsSnapshot.Value.RemoteConfiguration) { return Forbid(); } @@ -100,7 +100,7 @@ namespace slskd.Core.API [Route("yaml")] public IActionResult UpdateYamlFile([FromBody] string yaml) { - if (!OptionsSnapshot.Value.NoRemoteConfiguration) + if (!OptionsSnapshot.Value.RemoteConfiguration) { return Forbid(); } diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs index c4d675f3..dbcd13b3 100644 --- a/src/slskd/Options.cs +++ b/src/slskd/Options.cs @@ -184,10 +184,10 @@ namespace slskd /// <summary> /// Gets a value indicating whether remote configuration of options is allowed. /// </summary> - [Argument(default, "no-remote-configuration")] - [EnvironmentVariable("NO_REMOTE_CONFIGURATION")] - [Description("do not allow remote configuration")] - public bool NoRemoteConfiguration { get; private set; } = false; + [Argument(default, "remote-configuration")] + [EnvironmentVariable("REMOTE_CONFIGURATION")] + [Description("allow remote configuration")] + public bool RemoteConfiguration { get; private set; } = false; /// <summary> /// Gets the unique name for this instance. |
