【问题标题】:How to serve ionic app with https?如何使用 https 服务离子应用程序?
【发布时间】:2016-11-19 21:39:27
【问题描述】:

运行 ionic serve (ionic serve --lab) 允许在 http://localhost:8100/ionic-lab 上运行应用程序

尝试访问 https://localhost:8100/ionic-lab 会导致:

SSL 连接错误

有没有办法在 https 上运行应用程序?

我按照link 中的说明来克服 SSL 错误,但不知道如何将它与 ionic 一起使用(即我不知道如何在启动服务器使用命令ionic serve --lab)

【问题讨论】:

  • 不会将我的答案标记为正确?

标签: ssl https ionic-framework ionic2


【解决方案1】:

使用--ssl 选项:

ionic serve --lab --ssl

【讨论】:

    【解决方案2】:

    官方Github issues thread的步骤你试过了吗?

    创建自签名证书并使用 go 代理脚本运行它 https://gist.github.com/scrivy/0909468fde8f117a3d66507c8bb3fe12

    【讨论】:

      猜你喜欢
      • 2020-05-15
      • 2017-04-12
      • 2017-05-30
      • 2012-03-24
      • 2020-08-18
      • 1970-01-01
      • 2017-06-29
      • 2016-08-13
      • 1970-01-01
      相关资源
      最近更新 更多