Replies: 2 comments 1 reply
-
@kevinmcconnell can you help me? |
Beta Was this translation helpful? Give feedback.
-
Hi @jcmaciel, at the moment Kamal Proxy will only allow you to do this if it's not providing the SSL. To use the If you have the option to handle your SSL in another layer, then you can omit both the We actually have a PR in the works for this exact use case (#63). It's not merged yet, but when that lands it will allow your app to signal to the proxy which hosts should be allowed. That will give you dynamic host support along with the automatic SSL. That will probably be the best option, once it's available. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hello!
I’m using Kamal to deploy a Rails application that offers custom domain support to my clients. Right now, I have this snippet in my
deploy.yml
:Any requests from these hosts are properly forwarded to my Rails container. However, if a client sets up a custom domain (for example,
quiz.clientdomain.com
) that CNAMEs tocustom.interactivefunnel.com
, Kamal rejects the request with a 404 response before it even reaches the Rails app. That’s becausequiz.clientdomain.com
is not listed underproxy.hosts
.Current Problem
quiz.clientdomain.com
) pointing via CNAME tocustom.interactivefunnel.com
, or directly to my server’s IP behind Kamal.hosts
array indeploy.yml
and then redeploy.What I’ve Tried
hosts: ['*']
) — doesn’t seem to work, or it conflicts with existing hosts.deploy.yml
— it might work, but would still require a redeploy (and can be cumbersome).My Question / Feature Request
Is there a way to configure Kamal proxy as a “catch-all” or wildcard so that any incoming host is forwarded to my Rails container? The Rails application itself already handles these requests by checking
request.host
against a database. But currently, the Kamal proxy blocks them before they reach Rails.I’d greatly appreciate any guidance or best practices on handling custom domains without having to add each new domain to the
hosts
list and redeploy every time.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions