is it possible to use wilcard in firebase hosting?

0

I have a site hosted in firebase hosting, and wanted it to respond to any subdomain requests, such as a wilcard dns, for example:

If I access link or link or link or link or https: //*.moreirasbuffet.com

The client receives the same page as a response.

Is it possible?

obs: I do not want to and I can not create each subdomain manually.

    
asked by anonymous 07.06.2018 / 01:22

1 answer

0

As shown documentation , Firebase Hosting can do redirects . But these redirects only work in the URL (and not in subdomains as you need). For example, you could redirect link * to link just by editing your firebase.json file to place:

"hosting": {
  // Add the "redirects" section within "hosting"
  "redirects": [ {
    "source" : "/*",
    "destination" : "https://moreirasbuffet.com/index.html",
    "type" : 301
  } ]
}

Unfortunately, this functionality is not available for subdomains because Firebase expects you to create them manually (which you said you do not want or want).

    
07.06.2018 / 13:44