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

feat: HTTP/HTTPS flexible mode #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: HTTP/HTTPS flexible mode #1

wants to merge 8 commits into from

Conversation

did
Copy link
Owner

@did did commented Nov 29, 2024

TLS Flexible mode

The On-demand TLS feature offers a TLS certificate for any dynamic host.
However, some hosts can be served by Cloudflare, and in that case, Kamal Proxy is unable to generate a TLS certificate.

Unless you provide a custom TLS certificate for those hosts, a quick solution is to allow a non-secure connection between Cloudflare and Kamal Proxy ("flexible" mode in Cloudflare). On the Kamal Proxy side, we need to accept non-secure connections and not redirect them to HTTPS.

    kamal-proxy deploy service1 --target web-1:3000 --host "" --tls --tls-on-demand-url="http://localhost:4567/check" --tls-flexible-mode=true

In return, the application handling the requests from Kamal Proxy must be in charge of redirecting HTTP connections to HTTPS.

@did did force-pushed the feat-flexible-mode branch from 2907fa3 to 92aafd7 Compare November 30, 2024 14:19
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.

1 participant