generativelanguage.googleapis.com
这个api直接访问是404,我反代了之后也是,直接挂代理访问api是可以请求的。但是反代但是请求不了。请求也是返回404.
解决了,仅供参考:
location/
{
proxy_passhttps://generativelanguage.googleapis.com;
proxy_ssl_server_nameon;
proxy_set_headerHostgenerativelanguage.googleapis.com;
proxy_set_headerConnection"upgrade";
proxy_set_headerUpgrade$http_upgrade;
chunked_transfer_encodingoff;
proxy_bufferingoff;
proxy_cacheoff;
proxy_set_headerX-Forwarded-For$remote_addr;
proxy_set_headerX-Forwarded-Proto$scheme;
}
-----------------------------------------------------