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

Support multiple TLS domains #26

Closed
hasghari opened this issue May 6, 2024 · 8 comments · Fixed by #28
Closed

Support multiple TLS domains #26

hasghari opened this issue May 6, 2024 · 8 comments · Fixed by #28

Comments

@hasghari
Copy link
Contributor

hasghari commented May 6, 2024

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 and www.example.com?

@3v0k4
Copy link
Contributor

3v0k4 commented May 6, 2024

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.

@kevinmcconnell
Copy link
Collaborator

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?

@3v0k4
Copy link
Contributor

3v0k4 commented May 6, 2024

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.

@kevinmcconnell
Copy link
Collaborator

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?

@hasghari
Copy link
Contributor Author

hasghari commented May 6, 2024

Thanks for the feedback and your support for adding in this feature. I've created #28 as a first stab at this.

@victorlcampos
Copy link

Why not wildcard SSL?
TLS_DOMAIN=*.example.com

@airblade
Copy link

This would allow serving both example.com and www.example.com (with a redirect in the Rails app from one to the other).

@airblade
Copy link

Thank you very much!

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 a pull request may close this issue.

5 participants