Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
324 stars 56 forks source link

Add support for wildcard subdomains #460

Open freshcutdevelopment opened 3 years ago

freshcutdevelopment commented 3 years ago

Is your feature request related to a problem? Please describe. Currently, there is no way to set up a multi-tenant web app using Azure static sites that uses one domain per tenant.

Describe the solution you'd like Ideally, I'd like to be able to set up a wildcard domain entry (for example *.saas.app). That way I can run one subdomain per tenant in my multi-tenant SAAS application for example:

Failing this if the subdomain limit could be removed, it would also solve the problem. These are not multiple websites, just different ways of accessing the same site. Ideally, we shouldn't be billed extra for this. With app services, there are multiple methods to support this.

Describe alternatives you've considered Currently, we use Azure static websites instead and create a subdomain entry on the CDN per tenant. This is not ideal as creating each sub-domain is time-consuming.

This is currently a blocker for us adopting Azure static web apps for a couple of our projects.

ScottEBannister commented 3 years ago

Hello,

We have hit up against a similar issue in our investigation of whether we can adopt Azure static web apps for a couple of our portals. We also use subdomains to handle multi-tenancy. Being able to set up a wildcard domain entry would be a great feature!

Thanks

foconnor-DS commented 3 years ago

We just ran into this as well. We were expecting Azure App Service like custom domains, where wildcard's can be used for subdomains. As it stands now, to use ASA, we'd have to spin up a new ASA server every 5 subdomains, which seems like a waste. This should easily be supported out of the box.

Please consider allowing '*.domain.tld' in the custom domain validation.

Sample domain: *.test.com

Current errors it returns: "Request Envelope is invalid. Please ensure the custom domain is provided and well-formed." and "domainName is invalid. The domain name given was not found."

craigomatic commented 2 years ago

+1 on better support for SaaS solutions, was very disappointed to find there is such a low limit on subdomains!

Wildcard would be a good solution as we wouldn't have to make an API call to bind another subdomain. Although, having an ability to control which subdomains resolve to the SWA may be sensible as well.

Is there a way to request via support to increase the limit on our subscriptions?

Also from the docs I see a limit of 5, the API when we hit the limit disagrees: "The maximum number of custom domains allowed for this static site is 6."

MarioGK-AutoSystem commented 1 year ago

Are there any updates on this issues? static web apps is not on preview anymore

mborzsony commented 2 months ago

Is there any update on this issue?

AnthonyPhan commented 3 weeks ago

We have also hit this roadblock and would love to know if there's at least a work around that can be used in the mean time?