解决 Waline 无法获取用户真实 IP 的问题 发表于 2024-11-09 更新于 2025-11-23 分类于 技术 Waline: 阅读次数: 给 Waline 套上 Cloudflare 后,获取到的 IP 都是 CF 的,如何解决呢? 非常简单,只需在仓库里的index.cjs添加 1think.app.proxyIpHeader = 'CF-Connecting-IP'; 就行了 就像这样 12345678910const Application = require('@waline/vercel');module.exports = Application({ plugins: [], async postSave(comment) { // do what ever you want after comment saved },});think.app.proxyIpHeader = 'CF-Connecting-IP';