Firebase存储和无效的HTTP方法/ URL对

问题描述 投票:0回答:1

[当我尝试使用ReactReader提取Firebase存储文件时,出现以下错误:

{
"error": {
"code": 400,
"message": "Invalid HTTP method/URL pair."
}
}

代码正在向https://firebasestorage.googleapis.com/v0/b/发出请求。...

但是返回上面的错误。

有人遇到这个问题吗?

firebase firebase-storage
1个回答
0
投票

我遇到了同样的问题,它实际上是一项安全功能。

如安全规则所示,除非获得认证],否则我不应该访问数据。

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.