# Add this location inside your HTTPS server block for the tenant domain
# (e.g. inside the block that has server_name zoksh.sellzaki.local;)
#
# This proxies WSS (wss://zoksh.sellzaki.local/reverb/...) to Reverb on port 8080.
# Prerequisites:
#   1. In .env: REVERB_SERVER_PATH=/reverb
#   2. Run: php artisan reverb:start
#   3. Rebuild frontend: npm run react:build

location /reverb {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 86400;
}
