Search code examples
firebasefirebase-storagefirebase-hosting

Firebase: routing hosting requests to storage


How to route certain read requests (e.g. myapp.web.app/storage/avatar.jpg) to files that is stored in Firebase Storage? Reasons:


Solution

  • This is not possible just with any of the configuration options available for Firebase Hosting. Best you could do is rewrite a URL to Cloud Functions or Cloud Run, where you have code to download the content from Stroage and send that to the client.