mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
support custom master url
refactor api instatation to allow custom master url in config
This commit is contained in:
@ -98,6 +98,8 @@ namespace SharedLibraryCore.Configuration
|
||||
public string WebfrontUrl => string.IsNullOrEmpty(ManualWebfrontUrl) ? WebfrontBindUrl?.Replace("0.0.0.0", "127.0.0.1") : ManualWebfrontUrl;
|
||||
[ConfigurationIgnore]
|
||||
public bool IgnoreServerConnectionLost { get; set; }
|
||||
[ConfigurationIgnore]
|
||||
public Uri MasterUrl { get; set; } = new Uri("https://fn-p.master.threadsafe.sh/");
|
||||
|
||||
public IBaseConfiguration Generate()
|
||||
{
|
||||
|
@ -67,6 +67,10 @@ namespace SharedLibraryCore.Configuration.Validation
|
||||
RuleForEach(_app => _app.Servers)
|
||||
.NotEmpty()
|
||||
.SetValidator(new ServerConfigurationValidator());
|
||||
|
||||
RuleFor(_app => _app.MasterUrl)
|
||||
.NotNull()
|
||||
.Must(_url => _url != null && _url.Scheme == Uri.UriSchemeHttp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user