mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: Add null or empty check for AppUrl in SetAppUrl method
This commit is contained in:
parent
a27f604660
commit
041bb5c50e
1 changed files with 6 additions and 0 deletions
|
|
@ -583,6 +583,12 @@ namespace PepperDash.Essentials.Touchpanel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetAppUrl(string url)
|
public void SetAppUrl(string url)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(url))
|
||||||
|
{
|
||||||
|
this.LogInformation("AppUrl is null or empty, skipping SetAppUrl");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(localConfig.DevelopmentServerAddress != null)
|
if(localConfig.DevelopmentServerAddress != null)
|
||||||
{
|
{
|
||||||
url = Regex.Replace(url, @"^http://[^/]+", $"http://{localConfig.DevelopmentServerAddress}");
|
url = Regex.Replace(url, @"^http://[^/]+", $"http://{localConfig.DevelopmentServerAddress}");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue