国外服务器反代 nginx 配置 | server 运维论坛-大发黄金版app下载
2024/12/31实践中已使用 近1年
location / {
    # 转发地址
    proxy_pass  https://api.openai.com;
    # 避免出现反代https域名出现502错误
    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 '本机ip';
    proxy_set_header x-forwarded-proto 'https';
 }本作品采用《cc 协议》,转载必须注明作者和本文链接
                                
                                
                                    welcome come back
                                
                            
                        
                    