Fixed: Improve Bind Address validation and help text

Closes #2025

(cherry picked from commit 6bdeafcf8c78e145595f52e885356be1210abe91)
This commit is contained in:
Mark McDowall
2022-12-04 22:08:56 -08:00
committed by Qstick
parent cef06d11a5
commit 7dc061cc8a
5 changed files with 53 additions and 22 deletions
@@ -33,9 +33,9 @@ namespace Readarr.Api.V1.Config
_userService = userService;
SharedValidator.RuleFor(c => c.BindAddress)
.ValidIp4Address()
.ValidIpAddress()
.NotListenAllIp4Address()
.When(c => c.BindAddress != "*");
.When(c => c.BindAddress != "*" && c.BindAddress != "localhost");
SharedValidator.RuleFor(c => c.Port).ValidPort();