仅允许来自特定域的请求读取和写入数据Firebase [英] Allow only request from a specific domain to read and write data firebase

查看:84
本文介绍了仅允许来自特定域的请求读取和写入数据Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用Firebase来存储数据,并已将我的规则临时设置为公开.我不想添加用户身份验证,但是想知道是否可以设置Firebase规则,以便只有我的域才能读取和写入数据.

I recently started using firebase to store data and have had my rules set to public temporarily. I don't want to add user authentication, but instead was wondering if I could set the firebase rules so only my domain can read and write the data.

推荐答案

限制某些用户访问实时数据库的唯一方法是通过Firebase身份验证.没有办法限制对某些区域,IP的访问,或者对最终用户进行分类的其他方式.

The only way to restrict access to Realtime Database for certain users is through Firebase Authentication. There's no way to limit access to certain regions, IPs, or other ways of categorizing then end user.

这篇关于仅允许来自特定域的请求读取和写入数据Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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