Update local server IP addresses in DevHttpsConnectionHelper and MauiProgram for consistency
This commit is contained in:
parent
3be05e9c62
commit
adf335d2be
@ -31,9 +31,9 @@ namespace gehGassiApp.Core.Helper
|
||||
#if WINDOWS
|
||||
"localhost";
|
||||
#elif ANDROID
|
||||
"192.168.0.65";
|
||||
"192.168.0.172";
|
||||
#elif IOS || MACCATALYST
|
||||
"192.168.0.65";
|
||||
"192.168.0.172";
|
||||
#else
|
||||
throw new PlatformNotSupportedException("Only Windows and Android currently supported.");
|
||||
#endif
|
||||
@ -80,14 +80,14 @@ namespace gehGassiApp.Core.Helper
|
||||
{
|
||||
return
|
||||
Javax.Net.Ssl.HttpsURLConnection.DefaultHostnameVerifier.Verify(hostname, session)
|
||||
|| hostname == "192.168.0.65" && session.PeerPrincipal?.Name == "CN=localhost";
|
||||
|| hostname == "192.168.0.172" && session.PeerPrincipal?.Name == "CN=localhost";
|
||||
}
|
||||
}
|
||||
}
|
||||
#elif IOS || MACCATALYST
|
||||
public bool IsHttpsLocalhost(NSUrlSessionHandler sender, string url, Security.SecTrust trust)
|
||||
{
|
||||
if (url.StartsWith("https://localhost") || url.StartsWith("https://192.168.0.65"))
|
||||
if (url.StartsWith("https://localhost") || url.StartsWith("https://192.168.0.172"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public static class MauiProgram
|
||||
if (string.IsNullOrEmpty(address))
|
||||
{
|
||||
#if DEBUG
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.65:5001/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.172:8548/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
#elif STAGING
|
||||
Preferences.Set(Storage.ServerAddress, "");
|
||||
#elif DEBUGSTAGING
|
||||
@ -169,7 +169,7 @@ public static class MauiProgram
|
||||
if (string.IsNullOrEmpty(hubAddress))
|
||||
{
|
||||
#if DEBUG
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.65:5001/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.172:8548/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
|
||||
#elif STAGING
|
||||
Preferences.Set(Storage.HubAddress, "");
|
||||
@ -185,7 +185,7 @@ public static class MauiProgram
|
||||
if (string.IsNullOrEmpty(webServerAddress))
|
||||
{
|
||||
#if DEBUG
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.65:5001/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
Preferences.Set(Storage.ServerAddress, "https://192.168.0.172:8548/"); //TODO: Adresse lokaler Server setzen: z.B.: https://localhost:xxxxx
|
||||
|
||||
#elif STAGING
|
||||
Preferences.Set(Storage.WebServerAddress, "");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user