# HAProxy configuration snippet for Jitsi Meet
# Include in main haproxy.cfg or via haproxy.d directory

# Frontend rule for Jitsi (add to your HTTPS frontend)
# acl is_jitsi hdr(host) -i meet.example.com
# use_backend jitsi_web if is_jitsi

backend jitsi_web
    mode http
    option httpchk GET /
    http-check expect status 200
    # WebSocket support
    option http-server-close
    timeout tunnel 1h
    server jitsi 127.0.0.1:8443 check ssl verify none

# XMPP BOSH/WebSocket backend (if needed separately)
backend jitsi_xmpp
    mode http
    option httpchk GET /http-bind
    server prosody 127.0.0.1:5280 check
