-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add ability to use maui-blazor from http context #5639
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
Comments
@sake402 is this for displaying web assets directly from HTML, such as It should be noted that HTTP is not a secure protocol in any sense, so it is strongly discouraged to be used in any scenario at all. HTTP requests are vulnerable to many kinds of attacks. |
@Eilon Yes for assets. But In our case, we don't have control over the url of these assets as the source does not support https; |
@sake402 got it, thank you for clarifying. |
We've moved this issue to the Future milestone. This means that it is not going to be worked on for the coming release. We will reassess the issue following the current release and consider this item at that time. |
@sake402 Allowing the webview to disable HTTPS has security implications since there is nothing that tells users that the page is in an unsafe context. (It might also disable some APIs) and might cause issues with Blazor itself. There are ways in which you can accomplish this without having to change the URL scheme which will lower the security guarantees for your entire app. You can create a component that receives the URL, downloads the file, passes it down to JavaScript via JS interop, creates an object URL and passes that object URL to the actual image tag.
We do have an issue for having a built-in component in .NET 7.0 that will help with something like this. Based on this, I'm going to close this issue, since there are ways in which you can achieve this scenario and we are in general not comfortable with any flag that can lower the security in a production application. If we see more feedback in the future, we might reconsider. |
Description
Currently maui-blazor run in a browser client with url https://0.0.0.0. This makes it difficult to reference external url with http scheme due to browser security.
Public API Changes
Would love to be able configure
builder.RegisterBlazorMauiWebView()
to allow the url for the dom to be http instead of https.Possibly like
Intended Use-Case
In our case we are fetching external data from url that doesn't not have https at all
The text was updated successfully, but these errors were encountered: