firebase-hosting

How do I make a custom subdomain on Firebase?

核能气质少年 提交于 2019-11-26 15:24:10
I have purchased a domain ("www.mydomain.com"). How do I make a subdomain on Firebase ("sub.mydomain.com"), if I am using Firebase hosting? Chris Raynor Update You can now add multiple domains to a single Firebase Hosting site. Domains can either serve site content or redirect to another domain (editable at any time). In addition, you can now use subdomains of the same registered domain on different projects, such as example.com on one project and blog.example.com on another. Visit your hosting admin page to configure them. Original answer If you point multiple subdomains of mydomain.com to

Filtering results with Geofire + Firebase

早过忘川 提交于 2019-11-26 14:39:25
问题 I'm trying to figure out how to query with filter with Geofire. Suppose I have restaurants with different category. and I want to add that category to my query. How do I go about this? One way I have now is querying the key with Geofire, run the for loop through each key and get the restaurant, and insert the appropriate restaurant to the array. These seems so inefficient. Is there any other way to go about this? Ideally I will have the filtered results, and only load each item when they're

Can Firebase hosting restrict access to resources?

瘦欲@ 提交于 2019-11-26 11:25:18
Is it possible to restrict access to a resource (i.e. index.html) depending on whether the user is logged in or not? Maybe something like .htaccess? Frank van Puffelen No. Firebase hosting doesn't implement access control to static resources. Also see the discussion in the comments of this question: Firebase route security without AngularFire There's new info on this: https://firebase.google.com/docs/hosting/functions (example: https://github.com/firebase/functions-samples/tree/master/authorized-https-endpoint ) You should be able to use a Cloud Function to restrict access to content (which is

firebase cloud function won't store cookie named other than “__session”

青春壹個敷衍的年華 提交于 2019-11-26 11:15:12
问题 i followed the sample of authorized-https-endpoint and only added console.log to print the req.cookies, the problem is the cookies are always empty {} I set the cookies using client JS calls and they do save but from some reason, I can\'t get them on the server side. here is the full code of index.js, it\'s exactly the same as the sample: \'use strict\'; const functions = require(\'firebase-functions\'); const admin = require(\'firebase-admin\'); admin.initializeApp(functions.config()

Angular 6.0 firebase hosting deploy not working

我们两清 提交于 2019-11-26 11:06:03
问题 I am looking for a tutorial on how to properly setup the firebase-tools hosting on my angular 6.0 projects, and what I found is always like this. - firebase init - then select the Hosting - What do you want to use as your public directory? dist - Configure as a single-page app (rewrite all urls to /index.html)? Yes - Overwrite? No - ng build --prod - firebase deploy but after doing this, this is always what I\'ve got. 回答1: I found that the ng build --prod will create a dist and an another

Is it possible to create a new Firebase project by API?

不问归期 提交于 2019-11-26 07:47:09
问题 Is it possible to create new hosting projects by API, or another non-interactive method on Google Firebase? I already tried Firebase tools with a token, but it says that it is only possible to create a new project on Firebase Console. Some context : My project allows users to create static websites online and we are searching for solutions to host these sites. Firebase would be a great solution, but only if I could integrate the user\'s new project into my system, with Firebase projects. 回答1:

When I refresh my website I get a 404. This is with Angular2 and firebase

独自空忆成欢 提交于 2019-11-26 05:34:54
问题 When I refresh my website I get a 404. This is with Angular2, typescript and firebase. I\'ve deployed to firebaseapp with my Angular2 app. Routes seem to change fine but when I refresh the browser it redirects me to 404 page. When I refresh locally this doesn\'t happen. Am I missing any route settings or Firebase settings? This is my firebase.json file: { \"firebase\": \"test\", \"public\": \"src\", \"ignore\": [ \"firebase.json\", \"**/.*\", \"**/node_modules/**\" ] } 回答1: For Firebase

Firebase code pull

可紊 提交于 2019-11-26 04:48:07
问题 I need to pull down my code from a firebase hosted site, I created a site this past summer and no longer have the code locally on my laptop. I would like to recode some of the pieces, but don\'t have the source code anymore (other than the javascript and css I can glean from the served pages). I can\'t find a way to get the code from the firebase site, does anyone have any ideas? 回答1: There is no method available to grab your Firebase code. You should be utilizing your own version control (e

How do I make a custom subdomain on Firebase?

独自空忆成欢 提交于 2019-11-26 04:25:28
问题 I have purchased a domain (\"www.mydomain.com\"). How do I make a subdomain on Firebase (\"sub.mydomain.com\"), if I am using Firebase hosting? 回答1: Update You can now add multiple domains to a single Firebase Hosting site. Domains can either serve site content or redirect to another domain (editable at any time). In addition, you can now use subdomains of the same registered domain on different projects, such as example.com on one project and blog.example.com on another. Visit your hosting

Can Firebase hosting restrict access to resources?

吃可爱长大的小学妹 提交于 2019-11-26 03:25:35
问题 Is it possible to restrict access to a resource (i.e. index.html) depending on whether the user is logged in or not? Maybe something like .htaccess? 回答1: No. Firebase hosting doesn't implement access control to static resources. Also see the discussion in the comments of this question: Firebase route security without AngularFire 回答2: There's new info on this: https://firebase.google.com/docs/hosting/functions (example: https://github.com/firebase/functions-samples/tree/master/authorized-https