From f6fe445876c975b008724671c77b13df976601dc Mon Sep 17 00:00:00 2001 From: Markus Busche Date: Mon, 25 Aug 2025 21:05:49 +0000 Subject: [PATCH] Fix Caddyfile TLS directive syntax and optimize configuration for WebSocket support --- Caddyfile | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Caddyfile b/Caddyfile index 3cee675..1922c61 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,17 +1,9 @@ markov.elpatron.me { # Use Let's Encrypt for SSL certificates - elpatron@mailbox.org + tls elpatron@mailbox.org # Proxy all requests to the Flask application - reverse_proxy markov-economics:5000 { - # WebSocket support - header_up Upgrade {header.Upgrade} - header_up Connection {header.Connection} - header_up Host {host} - header_up X-Real-IP {remote_host} - header_up X-Forwarded-For {remote_host} - header_up X-Forwarded-Proto {scheme} - } + reverse_proxy markov-economics:5000 # Handle WebSocket upgrade requests specifically @websockets { @@ -19,13 +11,5 @@ markov.elpatron.me { header Upgrade websocket } - reverse_proxy @websockets markov-economics:5000 { - # Ensure WebSocket headers are properly forwarded - header_up Upgrade {header.Upgrade} - header_up Connection {header.Connection} - header_up Host {host} - header_up X-Real-IP {remote_host} - header_up X-Forwarded-For {remote_host} - header_up X-Forwarded-Proto {scheme} - } + reverse_proxy @websockets markov-economics:5000 } \ No newline at end of file