From 8ec370e09b15c6f23564142f9c01cdb4101488a3 Mon Sep 17 00:00:00 2001 From: iProbe Date: Wed, 15 Nov 2023 16:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'=E5=85=B6=E4=BB=96/nginx?= =?UTF-8?q?=E4=BB=A3=E7=90=86openai=E6=8E=A5=E5=8F=A3.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 其他/nginx代理openai接口.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 其他/nginx代理openai接口.md diff --git a/其他/nginx代理openai接口.md b/其他/nginx代理openai接口.md new file mode 100644 index 0000000..5bd8ee7 --- /dev/null +++ b/其他/nginx代理openai接口.md @@ -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; + } +} +``` \ No newline at end of file