How to add Firebase Storage Security Rule to allow Custom Domain

I have below rule set up for my Cloud Storage bucket in my Firebase project that allows write and read from all domains.

I want add a rule to allow write only from my domain like https://sub.domain.com

I have gone through this link but did not find appropriate option.

Here is my rule now.

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}

How do I add this rule?