Closed hasghari closed 4 months ago
You are right, currently only one domain is supported because we pass TLS_DOMAIN
to autocert.HostWhitelist
.
If @kevinmcconnell is interested in supporting multiple domains, I'd be happy to submit a PR.
I like the idea of supporting multiple domains 👍 That's a great idea.
@3v0k4 I'd love to see a PR for it! Are you thinking we'd use a comma-separated list, like TLS_DOMAIN=api.example.com,www.example.com
? Or something else?
Yes, the comma-separated list is the first thing that came to mind.
Should we rename the env to TLS_DOMAINS
? I think it would self-document better.
Hmm, good question...! I'd be tempted to leave it as-is, because I think the common case will be for a single domain, and it reads nicer for that case. Maybe we could try that way first, and mention the list form of its value in the documentation, and see how that feels?
Thanks for the feedback and your support for adding in this feature. I've created #28 as a first stab at this.
Why not wildcard SSL? TLS_DOMAIN=*.example.com
This would allow serving both example.com and www.example.com (with a redirect in the Rails app from one to the other).
Thank you very much!
If I am reading the documentation correctly, it seems like thruster only supports a single TLS domain. Is it a big lift to support multiple TLS domains in the same Rails app using thruster like
api.example.com
andwww.example.com
?