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
|
#if WINDOWS
|
||||||
"localhost";
|
"localhost";
|
||||||
#elif ANDROID
|
#elif ANDROID
|
||||||
"192.168.0.65";
|
"192.168.0.172";
|
||||||
#elif IOS || MACCATALYST
|
#elif IOS || MACCATALYST
|
||||||
"192.168.0.65";
|
"192.168.0.172";
|
||||||
#else
|
#else
|
||||||
throw new PlatformNotSupportedException("Only Windows and Android currently supported.");
|
throw new PlatformNotSupportedException("Only Windows and Android currently supported.");
|
||||||
#endif
|
#endif
|
||||||
@ -80,14 +80,14 @@ namespace gehGassiApp.Core.Helper
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
Javax.Net.Ssl.HttpsURLConnection.DefaultHostnameVerifier.Verify(hostname, session)
|
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
|
#elif IOS || MACCATALYST
|
||||||
public bool IsHttpsLocalhost(NSUrlSessionHandler sender, string url, Security.SecTrust trust)
|
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 true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,7 +154,7 @@ public static class MauiProgram
|
|||||||
if (string.IsNullOrEmpty(address))
|
if (string.IsNullOrEmpty(address))
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#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
|
#elif STAGING
|
||||||
Preferences.Set(Storage.ServerAddress, "");
|
Preferences.Set(Storage.ServerAddress, "");
|
||||||
#elif DEBUGSTAGING
|
#elif DEBUGSTAGING
|
||||||
@ -169,7 +169,7 @@ public static class MauiProgram
|
|||||||
if (string.IsNullOrEmpty(hubAddress))
|
if (string.IsNullOrEmpty(hubAddress))
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#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
|
#elif STAGING
|
||||||
Preferences.Set(Storage.HubAddress, "");
|
Preferences.Set(Storage.HubAddress, "");
|
||||||
@ -185,7 +185,7 @@ public static class MauiProgram
|
|||||||
if (string.IsNullOrEmpty(webServerAddress))
|
if (string.IsNullOrEmpty(webServerAddress))
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#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
|
#elif STAGING
|
||||||
Preferences.Set(Storage.WebServerAddress, "");
|
Preferences.Set(Storage.WebServerAddress, "");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user