Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase database rules date extension [duplicate]

This is my current firebase real-time database rules.

{
  "rules": {
    ".read": "now < 1633017600000",  // 2021-10-1
    ".write": "now < 1633017600000",  // 2021-10-1
  }
}

I understand that these rules are not secure but is there any way I can extend these rules beyond 2021-10-1 by changing the numbers? Can't find anything regarding '1633017600000' in the documentation.

like image 612
ztw Avatar asked Oct 17 '25 07:10

ztw


1 Answers

That is just Timestamp since UNIX Epoch in milliseconds. If you want to update to extend that time you can get a timestamp at Epoch Converter and enter your desired duration to get the timstamp. If you just don't want the time at first place then set the rules to true:

{
  "rules": {
    ".read": "true"
    ".write": "true"
  }
}

Again, setting these to true allows anyone to read/write to database so I'd recommend implementing the security rules as per your use case.

like image 128
Dharmaraj Avatar answered Oct 20 '25 20:10

Dharmaraj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!