跳到内容
SCRM DOC
Nginx创建于2024-05-19更新于 2025-03-22

nginx 反向代理解决 wechat 图片问题

vhost 下具体文件中的配置

location ^~ /wechat_image/ {  
add_header 'Access-Control-Allow-Origin' "$http_origin" always;  
add_header 'Access-Control-Allow-Credentials' 'true' always;  
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;  
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Mod ified- Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;  
proxy_pass http://thirdwx.qlogo.cn/;
}

然后重启 nginx 即可;

会将该域名 http://thirdwx.qlogo.cn/ 替换成 自己的域名下的 wechat_image

本页目录