Files
capitalism-eats-the-world/Caddyfile

31 lines
1011 B
Caddyfile

markov.elpatron.me {
# Use Let's Encrypt for SSL certificates
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}
}
# Handle WebSocket upgrade requests specifically
@websockets {
header Connection *Upgrade*
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}
}
}