【问题标题】:How to run flutter web application locally with https?如何使用 https 在本地运行 Flutter Web 应用程序?
【发布时间】:2020-04-26 19:10:31
【问题描述】:

我为 web 构建了 flutter 应用程序。并且能够使用以下命令启动应用程序。

flutter run -d chrome

但是上面的命令用http://localhost:59111在chrome中启动我的网络应用程序。 我需要在 https:// 中测试 Web 应用程序,而不是使用 http://

谁能建议我使用 https://localhost 启动网络应用程序。

【问题讨论】:

标签: flutter flutter-web flutter-test


【解决方案1】:

您可以使用mkcert 模拟受信任的证书,同时使用 localhost 在本地进行测试。 mkcert 自动创建并安装本地证书颁发机构 (CA),并生成本地受信任的证书。

【讨论】:

    猜你喜欢
    • 2020-07-24
    • 2021-01-12
    • 2017-12-29
    • 2020-07-03
    • 1970-01-01
    • 2017-01-14
    • 2011-07-08
    • 1970-01-01
    • 2021-07-17
    相关资源
    最近更新 更多