Loading... chevereto图床系统开启CDN加速后,后台显示的图片上传者IP均变成了CDN节点IP,这对图床的管理带来了很大的麻烦。其实这个问题与chevereto本身没有关系,而是Nginx被代理访问时获取真实客户端IP规则的问题。使用Nginx自带的realip模块就可以很简单的解决这个问题。 如果你使用的是宝塔,那么Nginx默认自动安装了这个模块,如果没有需要先安装**http_realip_module** 。 找到Nginx服务的配置文件nginx.conf,然后在 “http { ” 下方插入如下两行代码: ``` set_real_ip_from 0.0.0.0/0; real_ip_header X-Forwarded-For; ``` 重启Nginx;上传图片试试,已经显示的是客户端的真实IP <hr class="content-copyright" style="margin-top:50px" /><blockquote class="content-copyright" style="font-style:normal"><p class="content-copyright">版权属于:大漠孤狼</p><p class="content-copyright">本文链接:<a class="content-copyright" href="https://www.dmgls.com/1278.html">https://www.dmgls.com/1278.html</a></p><p class="content-copyright">转载时须注明出处及本声明</p></blockquote> Last modification:December 20th, 2021 at 02:15 pm © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 Appreciate the author