Firebase 存储中没有令牌的访问 url [英] Access url without token in Firebase Storage

查看:34
本文介绍了Firebase 存储中没有令牌的访问 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 firebase 存储下载 url,比如

I have a firebase storage download url, like

https://firebasestorage.googleapis.com/v0/b/siren-5eee7.appspot.com/o/profile%2FC6jNlR0F4cZBPv7wF0REWUNVor33?alt=media&token-23f-3a-token-5eee7.appspot.com/o/profile%2FC6jNlR0F4cZBPv7wF0REWUNVor33a2231c54a1043

如何在没有令牌参数的情况下访问此网址?

How can I access this url without token parameter?

例如,如果我在没有令牌的情况下访问上面的 url,将会出现 403 错误显示许可被拒绝.

For example, If I access above url without token there will be 403 error showing permisson denied.

我的 firebase 存储安全规则如下:

My firebase storage secure rule is below :

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}

此文件位于 /etc 文件中.我该怎么做?

This file located in /etc file. How can I do it?

推荐答案

尝试更改规则:

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read;
      allow write: if request.auth != null;
    }
  }
}

这篇关于Firebase 存储中没有令牌的访问 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆