Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard Domains Fail #79

Open
EyeDreamt opened this issue Mar 3, 2021 · 1 comment
Open

Wildcard Domains Fail #79

EyeDreamt opened this issue Mar 3, 2021 · 1 comment

Comments

@EyeDreamt
Copy link

When trying to set a wildcard domain you get an error saying the domain isn't a valid domain.

ex in yaml:

domain: "*.myapp.com"

result:

41s » Serverless » "*.myapp.com" is not a valid domain.

@Gabiras12
Copy link

Gabiras12 commented May 23, 2021

Hi. I've made a fork that makes subdomain and wildcard work.
It's here: https://github.com/Gabiras12/website
Basically, you define your domain as here but add an additional component input generateWildcardSubdomain.
E.g:

component: website-wildcard-domains        # (required) name of the component. In that case, it's website.
name: my-website                 # (required) name of your website component instance.
org: serverlessinc               # (optional) serverless dashboard org. default is the first org you created during signup.
app: my-app                      # (optional) serverless dashboard app. default is the same as the name property.
stage: dev                       # (optional) serverless dashboard stage. default is dev.

inputs:
  src: ./src                     # (optional) path to the source folder. default is a hello world html file.
  domain: myapp.com         # (optional) domain name. this could also be a subdomain.
  generateWildcardSubdomain: true

this will publish the website at the domain and at *.domain
notice I've published the component under a different name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants