# Install this as the server block for bouncingroom.counding.com.
# Replace the certificate paths if your hosting service uses different ones.
server {
    listen 80;
    listen [::]:80;
    server_name bouncingroom.counding.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name bouncingroom.counding.com;

    ssl_certificate /etc/letsencrypt/live/bouncingroom.counding.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/bouncingroom.counding.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        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;
    }
}
