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

fix multiple domains #7

Merged
merged 2 commits into from
Jan 4, 2016
Merged

fix multiple domains #7

merged 2 commits into from
Jan 4, 2016

Conversation

MichaelSp
Copy link
Contributor

Things like *.example.org is a valid entry for dokku vhost but is not supported by letsencrypt.

Things like *.example.org is a valid entry for dokku vhost but is not supported by letsencrypt.
@sseemayer
Copy link
Contributor

Thank you very much for your pull request! Before I merge this, would you mind fixing two small things?

  • If only a wildcard domain is configured as an app's URL, it will be filtered out and the letsencrypt client will be started without specifying a domain argument. Instead, we should fail with an error message.
  • Filtering out a wildcard domain should be shown to the user in a log message so they can tell what's going on. It might be possible to use the loop for constructing the domain arguments to give such a warning message.

@MichaelSp
Copy link
Contributor Author

I think there is a misconception about what this line does.
Here is an examples to understand this:

Suppose we have the following vhosts:
http://www.example.com *.other-example.org other-example.org
will be modified to
www.example.com other-example.org.

The provided regex just removes duplicates.
I don't think it is valid or possible to define * as vhost.

sseemayer added a commit that referenced this pull request Jan 4, 2016
@sseemayer sseemayer merged commit c6c29eb into dokku:master Jan 4, 2016
@sseemayer
Copy link
Contributor

Then I indeed had misconceptions about the patch - I thought the intent was to completely remove the URLs containing wildcards but reading the regular expression again plus your comment helped. Thanks!

As far as I read the dokku nginx-vhosts, domains and certs plugins, any string is a valid domain for the purposes of the plugins and will be passed into a server_name entry in the generated nginx configs. Since the wildcard domain doesn't match any of the names in the installed certificate and will thus not be returned by the get_ssl_hostnames function, the nginx-vhosts plugin will generate a non-https server entry. I guess that's the best we can do for the case of wildcard domains.

@sseemayer
Copy link
Contributor

Also, many thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants