Add WeChat API proxy configuration to Nginx.
This commit is contained in:
parent
2a8fea2422
commit
d93a5fe09e
@ -23,6 +23,27 @@ server {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# 微信 API 代理
|
||||
location /cgi-bin/ {
|
||||
# 保持原始 Host
|
||||
proxy_set_header Host qyapi.weixin.qq.com;
|
||||
|
||||
# 清除客户端 IP 信息,不转发上游 IP
|
||||
proxy_set_header X-Forwarded-For "";
|
||||
|
||||
# SSL 相关设置
|
||||
proxy_ssl_server_name on;
|
||||
proxy_ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
# 直接代理到微信 API
|
||||
proxy_pass https://qyapi.weixin.qq.com/cgi-bin/;
|
||||
|
||||
# 代理连接超时设置
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/tradewind.vip/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/tradewind.vip/privkey.pem;
|
||||
ssl_session_timeout 1d;
|
||||
|
Loading…
x
Reference in New Issue
Block a user