添加 '其他/nginx代理openai接口.md'

This commit is contained in:
iProbe 2023-11-15 16:07:18 +08:00
parent b4cb2ef43b
commit 8ec370e09b

View file

@ -0,0 +1,18 @@
```shell
server {
listen 80;
server_name {your_domain_name};
location / {
proxy_pass https://api.openai.com/;
proxy_ssl_server_name on;
proxy_set_header Host api.openai.com;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```