I want to make a set of rules, where it would only accept read and writes from a specified URL.
Example, when some code is trying to access my database, it would only let it access it if the domain was something like https://myProject.theHostDomain.com
I have looked up questions made by other people, and it seems confusing on the topic of the Google Firebase Realtime Database Security Rules. I can only think of one way to make my database secured, and that is by the domain of the website.
maybe something like:
{
"rules": {
".read": "$url === https://myProject.theHostDomain.com/",
".write": "$url === https://myProject.theHostDomain.com/"
}
}
I want to secure my database, because my database contains usernames, emails, passwords, and other private information my users will be having. I am hoping that has a solution, and I don't have to result to looking on about how to secure a database read and write rules from a specified url. Yes, I get that they can use the console in inspect element, but I can deal with that later.