注册限制来自IP地址

My users are getting the following when they try to signup:

“New registrations are not allowed from your IP address (maximum limit reached). Contact a staff member.”

I didn’t set a limit that I know of, so not sure why this is happening. We are all at the same three IP address because the forum is for a company intranet.

1 个赞

Either relax the limit in site settings or make sure there is at least one staff member from each IP.

What is that setting called though? I can’t find it.

Go to Settings and search for ‘registration’ - have a look for “max new accounts per registration ip”

It’s in the ‘spam’ menu item in Admin > Settings.

3 个赞

If I make it 0 will it be unlimited?

Not sure - make it six nines to be safe (don’t go too high or it might overflow)

We protect against overflows in settings because this has happened many times before.

2 个赞

I changed the option to 100 and I still have the issue. Does it take some time to be taken into account?

Ok sorry my IP was blocked. I authorized it and it’s now working.

2 个赞

谢谢,这个回复对我很有帮助 :grinning:

你好,Jeff,

我放宽了设置并重启了实例,但仍然遇到这个错误:

“errors”:{“ip_address”:[“不允许从您的 IP 地址进行新注册。”]}

还有其他可以尝试的方法吗?或者有什么更好的调试方式?

谢谢,
Evan

1 个赞

您是否在服务器上使用了反向代理,或者使用了 Cloudflare?

2 个赞

我使用了 Cloudflare,遇到了这个问题。

将 Cloudflare 模板添加到您的 app.yml 文件中并重新构建。

抱歉,Cloudflare 模板是什么?

通过 SSH 登录到您的服务器,编辑 app.yml 文件,在 templates 块中添加以下内容:

- "templates/cloudflare.template.yml"

请确保其与该块中的其他模板对齐。YML 文件对缩进错误非常敏感。- 前面需要有两个空格。

然后保存并重新构建。

2 个赞

谢谢!我们的网站由 Cloudflare 提供支持——我尝试将 templates/cloudflare.template.yml 添加到我们的 app.yml 中,但仍然遇到相同的错误消息。cloudflare 模板是否与 web.ratelimited 模板互斥?

1 个赞

它仍然发生。我正在使用 discourse API。

现在修复了吗?

不跟我一起