firebase-hosting

Remove file extensions for html files in firebase

橙三吉。 提交于 2020-06-27 04:24:07
问题 In firebase.json , is there a way to rewrite (not redirect) all requests to the corresponding .html file but leave other extensions? for example, https://example.com/foo will be the same as https://example.com/foo.html . But https://example.com/data will not be the same as https://example.com/data.xml . 回答1: This is the cleanUrls option (as in the docs) in firebase.json : { "hosting": { "cleanUrls": true } } 来源: https://stackoverflow.com/questions/60681599/remove-file-extensions-for-html

How can I get the hosting url instead of functions url in firebase functions for https

别说谁变了你拦得住时间么 提交于 2020-06-25 21:55:29
问题 I have dynamically generated urls that I need to create for staging and production environments. I am doing a mix of Firebase hosting and functions. I am also using Firebase config to route urls to my Firebase functions "app". When I try to get the hosting url when I visit my site with req.get('host') inside a Firebase function I get the functions url. How can I get the Hosting url? - the url that triggered the firebase function? 回答1: If you examine the contents of req.headers , you'll find

Firebase Cloud Storage: resource: the server responded with a status of 403 ()

怎甘沉沦 提交于 2020-06-17 09:45:11
问题 I make a simple audio recording web app using Firebase Hosting. I would like to record audio on browser and upload it to Cloud Storage. When I deploy and access my app, I can record audio. However the app failed to upload the audio to Cloud Storage. (I use Windows 10, Windows Subsystems for Linux, Debian 10.3 and Google Chrome browser. ) This is an error message in browser's console. firebasestorage.googleapis.com/v0/b/ondoku-dc29c.appspot.com/o?name=audio%2Fspeech.wav:1 Failed to load

Prevent Search Engine Indexing of Angular 5 Website - Firebase

江枫思渺然 提交于 2020-05-25 17:19:09
问题 How do I prevent my Angular 5 site from being indexed by search engines? I don't understand the documentation on Firebase indexing, and it seems like it refers specifically to indexing a mobile app, not an Angular website. Would I add a robots.txt, or does Firebase use another method? 回答1: A few things you can do: Solution 1 If you have access to the domain name and/or administrative privileges to the websites' HTML, you can go to Google/Bing webmaster tools and block your site from being

Prevent Search Engine Indexing of Angular 5 Website - Firebase

回眸只為那壹抹淺笑 提交于 2020-05-25 17:12:35
问题 How do I prevent my Angular 5 site from being indexed by search engines? I don't understand the documentation on Firebase indexing, and it seems like it refers specifically to indexing a mobile app, not an Angular website. Would I add a robots.txt, or does Firebase use another method? 回答1: A few things you can do: Solution 1 If you have access to the domain name and/or administrative privileges to the websites' HTML, you can go to Google/Bing webmaster tools and block your site from being

How to turn off default domain in firebase hosting - firebase

六眼飞鱼酱① 提交于 2020-05-15 21:22:11
问题 I just set up new Firebase Hosting and my custom domain and my web page, etc... Everything works great, except what is really bothering me are default Domains: projectname.web.app projectname.firebaseapp.com Looking around googling, I have not found a solution, how to remove or disable them... Any suggestion? This seems really annoying. It could be a show stopper for me... 回答1: I have contacted Firebase Hosting help. According to them, you can not disable, remove, hide or make them private.

Automatically Create New Pages in Firebase Hosting on user events(JAVASCRIPT)

半世苍凉 提交于 2020-04-27 10:19:27
问题 I'm creating a blog Website project using Firebase. What I want is - Create an entirely new Page for the Blog Posts once a USER creates it. FOR EXAMPLE - If a user submits a post with the title: "Best Watches in 2019" . then it should create a new page like: "blog.com/best-watches-in-2019.html" I searched the web a lot about this, but I'm still a beginner in Firebase. Please help me with a solution guys, or a workaround if it's not directly possible. 回答1: The following HTML page shows how you

Automatically Create New Pages in Firebase Hosting on user events(JAVASCRIPT)

[亡魂溺海] 提交于 2020-04-27 10:18:13
问题 I'm creating a blog Website project using Firebase. What I want is - Create an entirely new Page for the Blog Posts once a USER creates it. FOR EXAMPLE - If a user submits a post with the title: "Best Watches in 2019" . then it should create a new page like: "blog.com/best-watches-in-2019.html" I searched the web a lot about this, but I'm still a beginner in Firebase. Please help me with a solution guys, or a workaround if it's not directly possible. 回答1: The following HTML page shows how you

Automatically Create New Pages in Firebase Hosting on user events(JAVASCRIPT)

▼魔方 西西 提交于 2020-04-27 10:16:49
问题 I'm creating a blog Website project using Firebase. What I want is - Create an entirely new Page for the Blog Posts once a USER creates it. FOR EXAMPLE - If a user submits a post with the title: "Best Watches in 2019" . then it should create a new page like: "blog.com/best-watches-in-2019.html" I searched the web a lot about this, but I'm still a beginner in Firebase. Please help me with a solution guys, or a workaround if it's not directly possible. 回答1: The following HTML page shows how you

Automatically Create New Pages in Firebase Hosting on user events(JAVASCRIPT)

旧城冷巷雨未停 提交于 2020-04-27 10:16:10
问题 I'm creating a blog Website project using Firebase. What I want is - Create an entirely new Page for the Blog Posts once a USER creates it. FOR EXAMPLE - If a user submits a post with the title: "Best Watches in 2019" . then it should create a new page like: "blog.com/best-watches-in-2019.html" I searched the web a lot about this, but I'm still a beginner in Firebase. Please help me with a solution guys, or a workaround if it's not directly possible. 回答1: The following HTML page shows how you