c# - xamarin 表单 - webview 不安全连接 http

标签 c# forms http xamarin webview

您好,我需要连接到 http 而没有安全问题... 这是链接 http://audior.ec/recordmp3js/chrome 打开时会显示问题,但用 firefox

则不会
browser.Source = "http://audior.ec/recordmp3js/";

如果它在“firefox”上运行,这是来自网站的日志: 音频上下文设置。 navigator.getUserMedia 可用。 已创建媒体流。 输入采样率 48000 输入连接到音频上下文目标。 录音机初始化。

如果不能使用“chrome”,这一个:

No live audio input: SecurityError: Only secure origins are allowed (see: https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features).

最佳答案

正如 chrome 所说:

No live audio input: SecurityError: Only secure origins are allowed (see: https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features).

这意味着当您想在 chrome 中使用麦克风时,您需要安全的 https 连接。

这是一项需要在您的服务器上实现的安全措施。

您可以使用证书颁发机构获取证书(如 Lets Encrypt(免费))或使用自签名证书。虽然后者可能不起作用,因为它并不总是被认为是安全的

它在 firefox 中工作的原因是因为他们似乎没有选择这样的限制。这在未来可能会改变。


WebView

New Webviews also share the same rendering engine as Chrome for Android, so rendering should be much more consistent between the WebView and Chrome.

参见 Android Webview .我很确定 Xamarin 使用此实现。


安全来源

在撰写本文时,这些被认为是安全来源(参见链接)

“Secure origins” are origins that match at least one of the following (scheme, host, port) patterns:

(https, *, *)
(wss, *, *)
(*, localhost, *)
(*, 127/8, *)
(*, ::1/128, *)
(file, *, —)
(chrome-extension, *, —) 

关于c# - xamarin 表单 - webview 不安全连接 http,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50887049/

相关文章:

c# - LINQ,简化表达式 - take while take of sum of taken does not exceed given value

jquery - 当表单被动态添加到 DOM 时,检测 jQuery 中的表单提交

php - jQuery AJAX POST 允许在没有页面重定向的情况下发送表单数据-然后如何将数据插入 mysql

javascript - 循环访问 http 方法数组

vb.net - 我可以将后台智能传输服务与 FTP 一起使用吗?

c# - 为什么在 Azure Function v2 中运行的 ClaimsPrincipal 中缺少 'identityProvider' 声明?

C# 通用继承解决方法

c# - 在 Glide 中播放一次 GIF 图片

php - Drupal 7 表单在迁移后不起作用。提交后表单字段变为空

java - Android:下载文件并保存在SD卡上