diff --git a/src/Config/AppConfig.cs b/src/Config/AppConfig.cs index 02a4862..282c6a0 100644 --- a/src/Config/AppConfig.cs +++ b/src/Config/AppConfig.cs @@ -92,7 +92,7 @@ namespace iFileProxy.Config public int DailyRequestLimitPerIP { get; set; } = -1; public bool AllowDifferentIPsForDownload { get; set; } = true; public bool AllowStreamTransferOrZeroSize { get; set; } = false; - public bool EnableUserRegister { get; set; } = true; + public bool EnableUserRegistration { get; set; } = true; } public partial class Database diff --git a/src/Controllers/UserController.cs b/src/Controllers/UserController.cs index dce388c..4bbb554 100644 --- a/src/Controllers/UserController.cs +++ b/src/Controllers/UserController.cs @@ -20,7 +20,7 @@ namespace iFileProxy.Controllers [HttpPost("register")] public async Task> Register([FromBody] RegisterRequest request) { - if (!appConfig.SecurityOptions.EnableUserRegister) + if (!appConfig.SecurityOptions.EnableUserRegistration) return BadRequest(new CommonRsp { Message = "管理员设置了禁止注册新用户", Retcode = -1 }); try { diff --git a/src/iFileProxy.json b/src/iFileProxy.json index edee1ad..809678d 100644 --- a/src/iFileProxy.json +++ b/src/iFileProxy.json @@ -39,7 +39,7 @@ ], "AllowDifferentIPsForDownload": true, // 下载者与任务数据提交者IP不同是否允许下载文件 "AllowStreamTransferOrZeroSize": true, // 是否允许0大小文件或者动态大小文件下载 - "EnableUserRegister": true // 是否开放用户注册 + "EnableUserRegistration": true // 是否开放用户注册 }, "GithubProxy": { "SizeLimit": 10000000000,