代码之家  ›  专栏  ›  技术社区  ›  Daniel

仅通过云函数在firestore中读写

  •  0
  • Daniel  · 技术社区  · 7 年前

    我想设置我的cloudfirestore数据库权限,这样除了通过云函数之外,没有人能够从中读写。

    我该怎么做?

    service cloud.firestore {
      match /databases/{database}/documents {
        match /<some_path>/ {
          allow read, write: if <some_condition>;
        }
      }
    }
    
    1 回复  |  直到 7 年前
        1
  •  5
  •   Doug Stevenson    7 年前

    service cloud.firestore {
      match /databases/{database}/documents {
        match /{document=**} {
          allow read, write: if false;
        }
      }
    }
    

    推荐文章