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

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

Here is my rule now.

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

How do I add this rule?