惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
S
SegmentFault 最新的问题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Project Zero
Project Zero
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost
博客园 - 三生石上(FineUI控件)
Recorded Future
Recorded Future
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
T
The Exploit Database - CXSecurity.com
Schneier on Security
Schneier on Security
H
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
M
MIT News - Artificial intelligence
W
WeLiveSecurity
P
Proofpoint News Feed
A
About on SuperTechFans
S
Securelist
I
InfoQ
G
Google Developers Blog
博客园 - 司徒正美
博客园 - 叶小钗
Latest news
Latest news
F
Fortinet All Blogs
G
GRAHAM CLULEY
腾讯CDC
Jina AI
Jina AI
S
Schneier on Security
I
Intezer
V
Visual Studio Blog
美团技术团队
V2EX - 技术
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
罗磊的独立博客
Y
Y Combinator Blog

Discourse Meta - Latest posts

Horizon: High Context Topic Cards I'd like to ask what this file /var/www/discourse/vendor/data/RT_sRGB.icm is used for? Discourse to Markdown Plugin How to verify a subdomain (mysite.discourse.group) in Google Search Console? Reader Mode Publishing WordPress gallery posts on Discourse Discourse User Feedback New user filter by custom field and contact Interact with discourse from Python? Why we can't type the assignee in the search of a post to assign - home screen app Redis Flushall Category-toggled one-touch move post Some sort of variable to eliminate duplicate text? Why did this plugin replacement fail? Add user to list modal often appears above the mobile viewport sceen Creating/Editing a post on mobile: let's discuss the 2026 Discourse experience Wp-discourse feature request - do not show comments with specific tag? Are there any good Chinese plugins? Discourse ID and 2FA Discourse MCP is here! Sample Forum to See Admin Features? I am unable to register for a free Discourse site Wikipedia Lookup Add text for /login (like js.create_account.disclaimer for /signup) How can i set disable Markdown & Default to Rich Text What's the background image size for the Welcome Banner? How do I enable Associated Accounts with 2FA? Hamburger toggle Support <span data-attribute> in the rich editor Cannot disable read-only mode on Free Plan Coping with deprecated columns in Data Explorer Seeking advice on MaxMind error log issues Site setting menu limited by results page size Change default landing page for Groups (Members → Activity/Messages?) Email Notifications for Forum Posts or Replies Buffer -- streamline sharing topics on social media Moving a post between topics does not load the post on existing clients Diff is too complex to display Side bar footer container background color bug visible in RTL Vote display dimensions issue on the new foundation theme Icon is incredibly large when quoted Easily create Ideas categories using the Topic Voting plugin Modernizing the Foundation theme 429 error after Split Posts Error when switching locale: "topic doesn't exist" message appears on all topics Group Review Queue Items SSO Provider URL contains symbol # cause issue Migrate from wpForo to Discourse Users are unable to see invite details Disable initial page that re-directs to /login Discourse Livestream Discourse Dynamic Sidebar Icon Unable to save category settings made by plugins Post not being detected as German Misleading free plan shutdown timeline New posts/replies do not appear in real-time; manual refresh required Do Free forums not support the use of tags? Left side hamburger menu on mobile Inconsistent permission to use the same tag in the same category /upcoming-events intermittent drop on 2GB vRAM server 2 emails rejected by 2026.4.0-latest ( 5f0d95e1f1 ) Backups page Don't remove all push subscriptions on logoff Translated text on Linux Debian has weird formatting Remote images are always downloaded Can no longer create global banners from restricted categories Where did the you are replying to an old topic warning go? FKB Pro - Social theme Chat link missing in post event widget after to Rollup Whisper Warning Experiment: Collaborative content gardening hub for meta Topic Template Placeholder Text theme component Embedded comments dates are still not localized ProxyTracer: VPN & Proxy Blocker Automatically apply grids to image uploads What's causing the login issue? Single click activation of the Create Event modal Error in browser console when using hashtag autocomplete in the composer: undefined generateIconHTML How can badges and groups be localized (multilingual)? Exclude staged users from Watching? Shared Draft as default New Topic Allow AI Persona/Agent to respond only to @mentions, not to replies to its posts Adding a configurable delay to AI Agent responses Bidirectional sync between Discourse Topics/Categories and GitHub/Gitlab Issue Trackers "Key" and "Value" from the Wrap Modal are not translatable Deprecating .hbs file extension in themes and plugins New topic title input (#reply-title) remains LTR in RTL sites — fix still not effective (2026) Opening forum goes to topics 1 day ago, not recent topics Missing field 'text' (in 'mainEntity.suggestedAnswer') Current Projects - March 2026 Error loading route Caused by plugin 'discourse-subscriptions' User-specific 502 errors after login — traced to DiscourseUpdates.has_unseen_features? Force Mobile Homepage Documentation Plugin - Index Topic not working after Restore Returning bumping after editing last post Move 'whisper' functionality Any updates on the best way to create a HTML archive of a static site? Connect Discourse to WeChat Mini Program Send email notification only when @mentioned Include the Signatures plugin on more hosted plans
解决1Panel部署的Discourse,所有用户ip显示为来自 Cloudflare,而不是用户的浏览器真实IP的问题
@sniper756 · 2026-05-02 · via Discourse Meta - Latest posts
我在VPS上安装了1Panel,安装了Discourse(容器部署),使用OpenResty(容器部署)进行了反向代理。域名托管在Cloudflare,并开启了cdn小黄云。以下我写了教程,用于解决用户IP显示为来自 Cloudflare,而不是用户的浏览器IP的问题。 一、在1Panel中创建计划任务,每周下载最新的Cloudflare ip列表,并保存到Openresty的配置目录。 在 1Panel 左侧菜单栏点击 “计划任务” 。 点击右上角的 “创建计划任务” 。 按照以下参数填写(直接复制粘贴即可): 任务类型 :选择 Shell 脚本 。 任务名称 :例如 自动更新Cloudflare的IP段 。 执行周期 :建议选 每周 (例如每周六 凌晨 03:00)。 脚本内容 :将下面这段完整的代码直接复制进去( 注意:请先修改代码最上方的容器名和配置目录路径 ): #!/bin/bash # 配置区域 CONTAINER_NAME="1Panel中openresty的容器名称" # 修改为指定的网站 proxy 目录 CONF_DIR="/opt/1panel/www/sites/www.你的网站域名/proxy" echo "[$(date)] 开始从 Cloudflare 官方拉取最新 IP 段..." TEMP_DIR=$(mktemp -d) # 拉取并转换 IP 列表为 Nginx 识别格式 curl -fsS https://www.cloudflare.com/ips-v4 | sed 's/.*/set_real_ip_from &;/' > $TEMP_DIR/cf-ips-v4.conf curl -fsS https://www.cloudflare.com/ips-v6 | sed 's/.*/set_real_ip_from &;/' > $TEMP_DIR/cf-ips-v6.conf # 检查并移动文件 if [[ -s $TEMP_DIR/cf-ips-v4.conf ]] && [[ -s $TEMP_DIR/cf-ips-v6.conf ]]; then mv $TEMP_DIR/cf-ips-v4.conf $CONF_DIR/ mv $TEMP_DIR/cf-ips-v6.conf $CONF_DIR/ echo "[$(date)] 配置文件已成功更新到 $CONF_DIR。" else echo "[$(date)] 错误:拉取 Cloudflare IP 失败!" rm -rf $TEMP_DIR exit 1 fi rm -rf $TEMP_DIR # 测试并重载 Nginx echo "[$(date)] 正在进行 Nginx 配置测试..." if docker exec $CONTAINER_NAME nginx -t; then docker exec $CONTAINER_NAME nginx -s reload echo "[$(date)] 成功!OpenResty 配置重载完成。" else echo "[$(date)] 失败!Nginx 配置测试未通过。" exit 1 fi 任务创建好后,不需要等到周六,你可以立刻测试:在"计划任务"列表中找到刚才创建的任务。 点击右侧的 “报告” 按钮。查看弹出的日志窗口。如果最后几行显示 成功!OpenResty 配置重载完成 ,就说明整个流程在 1Panel 内部已经完美跑通了! 二、OpenResty 补充 realip 配置 在宿主机 /opt/1panel/www/sites/www.你的网站域名/proxy/ 目录下新建一个文件(文件名任意,以 .conf 结尾即可,会被主配置的 include *.conf 自动加载): realip.conf real_ip_header CF-Connecting-IP; real_ip_recursive on; 三、重载 OpenResty docker exec 1Panel中openresty的容器名称 nginx -t docker exec 1Panel中openresty的容器名称 nginx -s reload 四、验证 OpenResty 是否已获取真实 IP 查看 OpenResty 的 access log: tail -f /opt/1panel/www/sites/www.你的网站域名/log/access.log 如果配置正确,日志中的第一个 IP 应该变成你的真实公网 IP,而不是 Cloudflare 的 173.245.x.x 等段。 五、Discourse 侧说明 在Discourse 的app.yml中添加 - "templates/cloudflare.template.yml" 在 Discourse 直接面向 Cloudflare 时才有效。由于中间加了 OpenResty 反向代理,Discourse 容器看到的来源 IP 其实是 Docker 网关(如 172.17.0.1 或 172.18.0.1 ),所以该模板里的 set_real_ip_from <CloudflareIP> 不会匹配。 但只要你按上面的步骤在 OpenResty 层还原了真实 IP,并传递了干净的 X-Forwarded-For ,Discourse 后端的 Rails 就能正确识别真实用户 IP ,因为 Rails 默认已经信任 172.x.x.x 这类 Docker 私有网段。 所以无需在Discourse 的app.yml中添加 - "templates/cloudflare.template.yml" 。