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

Redirect to http://10.0.2.2 at startup #88

Open
nine-2-five opened this issue Oct 31, 2024 · 1 comment
Open

Redirect to http://10.0.2.2 at startup #88

nine-2-five opened this issue Oct 31, 2024 · 1 comment

Comments

@nine-2-five
Copy link

Hi,

we're running Svelte SPA app inside HWV, but for easier debugging it would be of great help to us to be able to direct the HWV to a localhost URL, like http://10.0.2.2:5173 which is the case for our Svelte app.
10.0.2.2 is a special URL in Android emulator which stands for localhost on development PC.

I tried: mainHybridWebView.Source = "http://10.0.2.2:5173"; in MainPage.xaml.cs, but after inspecting with chrome://inspect#devices the URL in HWV is still https://0.0.0.0

@nine-2-five
Copy link
Author

Fixed by redirecting inside Svelte instead of MAUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant