You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Richard Chien edited this page Feb 10, 2018
·
2 revisions
部分用户在公网环境下使用 HTTP API 插件的用户可能会对 HTTPS 有需求,但目前 HTTP API 插件本身不支持直接配置 SSL/TLS 证书,在可预见的未来也不会加入这个功能。因此,要使用 HTTPS 需要使用第三方软件来进行代理,除了广为人知的 Nginx、Apache 等,推荐使用 Caddy 这个轻量且易用的 web 服务器软件来支持 HTTPS。
推荐 Caddy 的原因主要有下面几个:
主程序为单个可执行文件,且体积不大
支持多种平台,Linux、Windows、macOS 等
可以自动从 Let's Encrypt 签发证书
配置文件编写非常简单
配置方式(使用 Caddy 为例)
我们现在假设你有一个酷 Q 运行在一台 Windows Server 上,监听 127.0.0.1:5700,解析到服务器公网 IP 的一个域名是 example.com,现在你想在另一台非内网服务器上通过 HTTPS 协议访问 example.com:5701 以调用 HTTP API 插件的 API 接口。