快速实现本地 https 预览
127.0.0.1 dev.xxxx.com
借助 Fiddler 或者 Charles 可以实现代理,从而让手机进行域名的访问。 不过我们有的时候需要访问 https 的服务。 这个时候相对来说,我们可以在使用 serve 基础上,安装 https-localhost 来进行服务的启动。
在这之前,我们也需要安装 nss 。
brew install nss
npm i -g --only=prod https-localhost
serve ./
Serving static path: /Users/www/freleap.github.io
http to https redirection active.
Server running on port 443.
原文:https://www.jackpu.com/local-https-preview/
本文内容仅供个人学习/研究/参考使用,不构成任何决策建议或专业指导。分享/转载时请标明原文来源,同时请勿将内容用于商业售卖、虚假宣传等非学习用途哦~感谢您的理解与支持!