Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webview host address to 0.0.0.1 #85

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions HybridWebView/Platforms/Android/HybridWebView.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace HybridWebView
{
partial class HybridWebView
{
private static readonly string AppHostAddress = "0.0.0.0";
private static readonly string AppHostAddress = "0.0.0.1";

/// <summary>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.0/</c>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.1/</c>
/// </summary>
private static readonly string AppOrigin = $"https://{AppHostAddress}/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HybridWebView
{
partial class HybridWebView
{
internal const string AppHostAddress = "0.0.0.0";
internal const string AppHostAddress = "0.0.0.1";

internal const string AppOrigin = "app://" + AppHostAddress + "/";
internal static readonly Uri AppOriginUri = new(AppOrigin);
Expand Down
4 changes: 2 additions & 2 deletions HybridWebView/Platforms/Windows/HybridWebView.Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ partial class HybridWebView
// Using an IP address means that WebView2 doesn't wait for any DNS resolution,
// making it substantially faster. Note that this isn't real HTTP traffic, since
// we intercept all the requests within this origin.
private static readonly string AppHostAddress = "0.0.0.0";
private static readonly string AppHostAddress = "0.0.0.1";

/// <summary>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.0/</c>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.1/</c>
/// </summary>
private static readonly string AppOrigin = $"https://{AppHostAddress}/";

Expand Down
2 changes: 1 addition & 1 deletion HybridWebView/Platforms/iOS/HybridWebView.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HybridWebView
{
partial class HybridWebView
{
internal const string AppHostAddress = "0.0.0.0";
internal const string AppHostAddress = "0.0.0.1";

internal const string AppOrigin = "app://" + AppHostAddress + "/";
internal static readonly Uri AppOriginUri = new(AppOrigin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.1" />

<mp:PhoneIdentity PhoneProductId="5B5DF893-8256-45F3-B7A6-10C1FFA69401" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1>HybridWebView demo: Proxy</h1>
This is useful in scenarios where the request is being made from HTML elements, like an <code>img</code> tag, or a external library that only takes in string URLs.
Proxy request URLs can be created with the format <code>/proxy?</code> and appending a custom query string. Some JavaScript libraries may require the full URL to be passed in.
This can be done by calling <code>`${window.location.origin}/proxy?`</code> and appending the custom query string.
Proxy URLs will look something like this: <code>https://0.0.0.0/proxy?myParameter=myValue</code> or <code>app://0.0.0.0/proxy?myParameter=myValue</code> depending on the platform.
Proxy URLs will look something like this: <code>https://0.0.0.1/proxy?myParameter=myValue</code> or <code>app://0.0.0.1/proxy?myParameter=myValue</code> depending on the platform.
</div>
<div>
<b>Create proxy URLs and pass into native HTML elements</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.1" />

<mp:PhoneIdentity PhoneProductId="C144569D-A0AF-41CF-BBF9-CE7F1654CD23" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
Loading