firebase-hosting

How can I upload a file from AngularJS application to Firebase Hosting

↘锁芯ラ 提交于 2019-12-13 03:57:49
问题 I am using Firebase Hosting to host my AngularJS application. I am using ng-file-upload to grab the user-uploaded image from a form I already have in my application. I want to store the user-uploaded image in a folder on my Firebase Hosting. I cannot use Firebase Storage because I need a pre-determined, direct link to the image resource in various parts of my platform. I thought that maybe I could use Firebase Functions to upload the file and store it in my Firebase Hosting. I keep running

Is it possible to host a express and socket.io app on Firebase Hosting?

此生再无相见时 提交于 2019-12-13 02:44:42
问题 I've been following Firebase cloud functions for a while now. Recently I came across hosting Node.js apps on Firebase Hosting, but it was using just express. Can we host socket.io apps on Firebase? 回答1: Firebase employee here This is not possible with Firebase Hosting, even if it's hooked up to Cloud Functions to provide a backend. If you want realtime socket communication between clients, consider using Realtime Database as a conduit between them. You'll get more done, write less code, and

Proper firebase security rules for implementing RBAC

谁都会走 提交于 2019-12-13 01:48:51
问题 I am in the process of building a multi-tenant app using firebase. While building the app I am building out an RBAC model that enables users to be apart of multiple organizations and be assigned multiple roles within each organization. Each role has assigned resources that a user would have access to. Given a firebase structure like the following, how would one go about creating a proper firebase security rule that would determine if the user has access to a resource in a given organization?

Dynamic Links Custom Path not applied in Firebase Authentication

旧城冷巷雨未停 提交于 2019-12-13 01:45:54
问题 I have setup Firebase Dynamic Links with an URL in the following format: a.b.c/d However, emails sent by Firebase Authentication contain Dynamic Links of the format a.b.c/?link=... instead of a.b.c/d/?link=... , which means that they do not work. I followed this guide / this guide to send the links. Whenever I manually copy the link and add d/ in the URL, the Dynamic Links will work since Dynamic Links is set up this way in Firebase Console and also in firebase.json for Firebase Hosting .

Firebase Functions Custom Domain with Single Page App

蹲街弑〆低调 提交于 2019-12-12 16:26:39
问题 I have a Firebase hosted single page app. I also have 3 Firebase functions (contact, plans, features) that the app and external sources make requests of. My app has a custom domain, which I'd like to access my functions via. This is my current firebase.json config { "hosting": { "public": "www", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } So currently all traffic goes to my app and routing is handled via my

Upload to Firebase Hosting not working correctly

折月煮酒 提交于 2019-12-12 12:19:12
问题 I've just finished building my first web app using AngularJS and Firebase for my real time database. When I run it on localhost everything I want it to do is working good for me. However, when I've loaded it up to Firebase Hosting and gone and opened it, the files haven't loaded correctly. My CSS file is blank and both my app.js and maincontroller.js files have all of my index.html code in them instead of the JavaScript code that should be there. Here is a link to my app so you can see what I

angular 6, build can't load images on Firebase hosting

▼魔方 西西 提交于 2019-12-12 12:09:10
问题 I'm unable to load images from the assets folder after deploy the angular app to firebase hosting. (build --prod) when run on localhost the images show. All other things are loading properly. this is my package json cli: ~6.2.0-beta.2 firebase-tools: 4.1.0 { "name": "protocols", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "deploy": "ng build --prod && firebase deploy" }, "private": true,

serving gzipped files on Firebase Hosting

南楼画角 提交于 2019-12-12 07:52:47
问题 I am interested in serving gzipped html/css/js files using Firebase Hosting. I tried setting the Content-Encoding header in firebase.json, but it errors on deploy. purportedly, the only headers you can set include: Cache-Control,Access-Control-Allow-Origin,X-UA-Compatible,X-Content-Type-Options,X-Frame-Options,X-XSS-Protection any ideas out there? 回答1: By default, Firebase Hosting already gzips all of your files. Here, for example, are the response headers for a css file I have hosted on

Property 'firebase' does not exist on type { production: boolean; }

送分小仙女□ 提交于 2019-12-12 07:09:42
问题 So I was trying to build and deploy my Angular 4 app for production on both Firebase and Heroku, but I have come across the error as follows: ERROR in /Users/.../... (57,49): Property 'firebase' does not exist on type '{ production: boolean; }'. It occurs when I run ng build --prod , and my deployment servers are working perfectly fine. Here is my app.module.ts file, for reference: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import {

Set file MIME type on Firebase Hosting

这一生的挚爱 提交于 2019-12-12 00:51:19
问题 I'm implementing Universal Links on iOS 9+ and am trying to add the apple-app-site-association file to my Firebase Hosting root: https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/ If your app runs in iOS 9 and later and you use HTTPS to serve the file, you can create a plain text file that uses the application/json MIME type and you don’t need to sign it. How can I set the MIME type to "application/json"? It looks like the documentation does not