Firebase主机上的速率限制 [英] Rate Limiting on Firebase Hosting

查看:66
本文介绍了Firebase主机上的速率限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找通过IP对限制请求进行评分的方法,但找不到任何资源.基本上,我正在寻找的是一种实现防火墙逻辑的方法.我知道我可以使用数据库规则来限制经过身份验证的用户请求,但是如何限制页面访问量呢?例如,我只想为每个IP每分钟允许150个请求.有什么办法吗?否则,攻击采用Blaze计划的小型企业不是很容易吗?

I've been searching for ways to rate limit requests by IP, but was not able to find any resources. Basically what I'm looking is a way to implement firewall logic. I know that I can limit authenticated user requests with database rules, but how do I go about limiting page hits? For example I only want to allow 150 requests per minute for each IP. Is there any way to do this? Otherwise, wouldn't it be easy to attack small businesses who are on Blaze plan?

推荐答案

此处有Firebaser.

Firebaser here.

Firebase Hosting当前无法基于IP地址进行速率限制.我们的CDN合作伙伴包括一些针对(D)DoS攻击的内置防护,但是目前尚无法配置.将来,我们计划进行成本控制,以便您可以手动设置自己的全局使用限制,以防止账单过大.

There is currently no way to rate-limit based on IP address with Firebase Hosting. Our CDN partner includes some built-in protection against (D)DoS attacks, but this is not presently configurable. In the future we plan to have cost controls so you can manually set your own global usage limit to prevent unexpectedly large bills.

同时,我们发现这通常不是问题.如果您确实遇到怀疑滥用的使用情况,请联系Firebase支持,我们将与您一起解决该问题,使每个人都满意.

In the meantime, we find that this generally isn't a problem. If you do run into usage that you suspect is abuse, please reach out to Firebase support and we'll work with you to resolve the situation to everyone's satisfaction.

这篇关于Firebase主机上的速率限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆