firebase-hosting

How can i implement a .htaccess configuration in Firebase Hosting

99封情书 提交于 2019-12-05 12:59:10
I have in my domain a .htaccess configuration that allows my app to work perfectly with the routes. It avoids the error when you refresh an angular 2 app can't resolve the routes. My current config is ths one <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # not rewrite css, js and images RewriteCond %{REQUEST_URI} !\.(?:css|js|map|jpe?g|gif|png|php)$ [NC] RewriteRule ^(.*)$ /index.html?path=$1 [NC,L,QSA] </IfModule> I'm trying to implement the same configuration in my Firebase Hosting because I'm migrating my site, I don't know

How can I install wordpress in the firebase hosting?

主宰稳场 提交于 2019-12-05 11:35:39
问题 How can I install Wordpress in the Firebase Hosting ? I tried to find an article to help me to install but I didn't find one. 回答1: WordPress requires PHP to run on the server and Firebase Hosting can't run server-side code (no PHP) but only static content (html, images, js, etc). So the answer is, you can't install WordPress in the Firebase Hosting. 回答2: You can't install the dynamic version of Wordpress. Instead, you can create a static version of Wordpress using a plugin called Simply

Is it possible to configure redirection with wildcard for Firebase hosting so that the wildcard parameter is interpolated into string?

旧时模样 提交于 2019-12-05 11:22:09
I'm looking for a way to configure a redirection in Firebase so that the "pretty" url like https://customdomainname.com/story/asdf is redirected to the real path in Firebase which is generated like https://firebasestorage.googleapis.com/v0/b/myprojectname-12345.appspot.com/o/stories%2Fasdf.m4a?alt=media&token=574e6dee-f289-468d-99ad-6e5d2ac8d6aa . For doing that I have connected a custom domain to firebase so that now I see both the default domain and the custom connected domain (probably I have been already mistaken at this step). I have installed the Firebase console, initialized a project

Authentication for firebase hosting

荒凉一梦 提交于 2019-12-05 07:40:30
I have a static app hosted on Firebase hosting whose backend is also on Firebase(communicating using firebase JS api). I want to add a simple auth page to all pages of this website so that only users I want can access this site. Is this possible? Looked at the docs but didn't find anything that helps me in this regard. You can do this using Firebase Functions, and an Express call. Put all of your static files into a folder named functions/admin and put this function into functions/index.js : exports.admin = functions.https.onRequest((req, res) => { const url = req.originalUrl ? req.originalUrl

Trouble with deep routes on a single-page app on Firebase hosting

血红的双手。 提交于 2019-12-04 20:34:35
问题 (Updated below with a little more info) We have a react-based single-page web app that lives on Firebase Hosting. We've been using hash-based routing up to this point (e.g. mysite.com/#/path/to/content ). We introduced React Router, which allows us to have prettier URLs (e.g. mysite.com/path/to/content ), but now the app doesn't load when we navigate directly to a deep route. Details below: Using React Router required us to use URL Rewriting in Firebase Hosting. The directions are pretty

How can I verify my custom domain using domains.google.com

依然范特西╮ 提交于 2019-12-04 19:25:45
问题 How can I verify my custom domain using domains.google.com if it doesn't allow duplicate keys and firebase hosting requires a duplicated key entry? And firebase requires 2 text entries with same host. 回答1: DNS records in Google Domains can contain multiple values. So while you can only have a single TXT record for a given name, it can contain all the values you need to validate the domain for Firebase Hosting. The steps are: Click the Edit link next to your TXT record. Click the small + next

Firebase Hosting: cache busting scripts on deploy

我与影子孤独终老i 提交于 2019-12-04 14:44:58
I have a Polymer (single page app) application hosted on firebase. When I deploy a new version to firebase, I'll like firebase to reload the javascript source instead of using cached ones. Is it possible to do that via firebase.json? If so, how? Or do i have to manually add a cache busting url to my build output? Thanks Adding Webpack or a similar tool to your build is probably the easiest way to go, as there's not currently a way to achieve the desired result with Firebase directly: How Can I Make Webpack Use a Cache-Busting Suffix? If you're okay removing the cache completely, you can simply

Where to generate a PDF of Firebase Database data - mobile app, or Firebase Hosting web app

≯℡__Kan透↙ 提交于 2019-12-04 14:41:09
问题 I have an Android app and a web app (hosted on Firebase Hosting). The Android app generates data and saves it to the Firebase Realtime Database. Both the Android app and web app can view the data. Where is the best place to generate a PDF of the data from the Firebase Database - the Android app or the web app (via JavaScript, eg. jsPDF)? It would be saved in Firebase Storage. I thought that the Android app could call the backend to generate a PDF, and a link to the PDF would be sent back to

A record vs CNAME record for custom domain

好久不见. 提交于 2019-12-04 13:04:30
Which should I pick and why? Firebase recommends CNAME records but why? Isn't it better to point to the ip address rather than point to another domain that points to the ip address? Firebase recommends CNAME records but why? Firebase hosting is probably marking CNAME records as recommended because they are widely allowed for setup by registrars and the easiest to setup for most novices when setting up their wildcards. Isn't it better to point to the ip address rather than point to another domain that points to the ip address? YES you are correct. It is going to be a faster lookup because it

How to reference Firebase Functions config variables from a Firebase-hosted application?

余生颓废 提交于 2019-12-04 06:09:54
问题 I am transitioning a Heroku-hosted ReactJS/NodeJS application to be hosted on Firebase. Because Firebase only handles static pages I need to reconfigure how my private environmental-specific variables for Development, Staging, Production environments are configured. For example before I defined these sorts of variables: CLIENT_ID=secret_here DOMAIN=secret_here REDIRECT_URI=secret_here upon the Heroku environment I was deploying to and now I must set them into firebase functions environments