如何将最终接口设置成https?
Closed this issue · 3 comments
Checklist
- 我相信这个想法很棒并且将使框架变得更好
- 我已在issue中搜索了类似请求,包括已关闭的请求
详细描述
如题,部分安卓app,不允许http访问,只能用https
Bot detected the issue body's language is not English, translate it automatically.
Title: How to set the final interface to https?
Checklist
- I believe this idea is great and will make the framework better
- I have searched for similar requests in the issue, including closed requests
A detailed description
As the title states, some Android apps do not allow http access and can only use https
-
更建议的方式是申请一个域名,然后可以参考这里 使用nginx或caddy 和证书 将8000端口转发到https端口。
-
也可以参考
openai-forward/openai_forward/__main__.py
Lines 25 to 26 in e7da8de
直接通过环境变量传入证书文件路径,通过https访问直接访问https://ip:8000 端口(不推荐)
Bot detected the issue body's language is not English, translate it automatically.
-
The more recommended way is to apply for a domain name, and then [refer here](https://github.com/KenyonY/openai-forward/blob/main/deploy.md#%E5%BC%80%E5%90 %AFssl-%E4%BB%A5https%E8%AE%BF%E9%97%AE%E5%9F%9F%E5%90%8D) Use nginx or caddy and a certificate to forward the 8000 port to the https port.
-
But you can also refer to
openai-forward/openai_forward/__main__.py
Lines 25 to 26 in e7da8de
Pass the certificate file path directly through the environment variable and allow port 8000 to be accessed through https (not recommended)