firebase-hosting

How to change Firebase homepage destination

邮差的信 提交于 2019-12-08 03:29:59
问题 It doesn't really looks like Firebase respect firebase.json config file when it comes to homepage.. I need to use a rendertron middleware function for all routes. It successfully runs for child routes, but never for the home route Even the simple config file like, invokes entry function for all routes, but not / : { "hosting": { "public": "dist", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "**", "function": "entry" } ] } } Does anyone came across this

Adding custom domain (crazydomains): Unexpected TXT records found. Continuing to watch for changes

情到浓时终转凉″ 提交于 2019-12-07 18:53:53
问题 I've added the TXT records according to firebase's instructions. Also had crazydomains support verify the settings, but I'm still getting the Unexpected TXT records found. Continuing to watch for changes. message at the Verify step. Anyone had experience doing this with crazydomains? I've read on another similar post targeted at NAMECHEAP, but I don't see how I can add the '@' to the Host field with crazydomains. Here is my settings on crazydomains. 回答1: Google support staff (Neel) provided a

Firebase Hosting Flask Application

故事扮演 提交于 2019-12-07 14:32:34
问题 I'm attempting to host a simple flask application on a hackathon project, but I'm running into an issue where it can not identify the routes. For example, say my flask route is: @app.route('/helloWorld', methods=['POST']) def index(): inputted_name = request.form['nm'] return 'Hello World ' + inputted_name and my index.html is <html> <body> <form action = "{{ url_for('helloWorld') }}" method = "post"> <p>Enter Name:</p> <p><input type = "text" name = "nm" /></p> <p><input type = "submit"

How to include subdirectories in firebase hosting

心已入冬 提交于 2019-12-07 14:26:54
问题 My site consists of main page and then subages separated inside folders. How can I include subpages in my page host (firebase hosting) 回答1: (Frank's comment was really an answer) Firebase deploys everything under the directory that you indicate. So if you have your main page (index.html) in the current and directory and the other pages in subdirectories under that, they should all be deployed if you configure public to point to the current directory. Deployment Configuration 回答2: Update Node

How can i implement a .htaccess configuration in Firebase Hosting

耗尽温柔 提交于 2019-12-07 09:03:24
问题 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

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

杀马特。学长 韩版系。学妹 提交于 2019-12-07 04:23:16
问题 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

Authentication for firebase hosting

不羁的心 提交于 2019-12-07 02:32:23
问题 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. 回答1: 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

Firebase hosting custom domain error

和自甴很熟 提交于 2019-12-07 02:05:57
问题 I have recently acquired a .tk domain and was willing to link it to Firebase hosting as a custom domain. After reading documentation and following the tutorial, I successfully deployed my first app to Firebase hosting. It is accessible via the default firebaseapp.com url. However, after trying to set up a custom domain, I have had problems trying to verify my ownership of the domain. I added two TXT DNS records as instructed and have waited for a day for Firebase to verify, but I get the

Firebase hosting not validating TXT record in GoDaddy

风格不统一 提交于 2019-12-06 16:35:59
问题 I deployed my app and now I'm trying to add my custom URL. I followed Firebase's instructions and added their TXT record to my DNS (GoDaddy). But now Firebase is saying it's still not verified. I assume I'm doing something wrong, but there's not much here to mess up... 回答1: Per my comment above, the solution was to use the @ sign in the Name column of GoDaddy, not the actual name of the domain that is owned. 回答2: To add a bit more information to this great solution for future reference. DNS

A record vs CNAME record for custom domain

独自空忆成欢 提交于 2019-12-06 08:09:49
问题 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? 回答1: 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