server { listen 80 http2; listen 443 ssl http2; server_name snapdrop.example.com; ssl_certificate /etc/nginx/ssl/snapdrop.example.com.crt; ssl_certificate_key /etc/nginx/ssl/snapdrop/example.com.key; root /usr/share/snapdrop/client; index index.html; client_max_body_size 0; location /server { proxy_connect_timeout 300; proxy_pass http://127.0.0.1:3000; proxy_set_header Connection "upgrade"; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # If you intend to run the Snapdrop server on the same network as where your users are, # you should uncomment this and delete the previous line. You may want to choose a different # value to "0.0.0.0", but ultimately as long as it's a valid IP address it doesn't matter what it is. # References: # https://github.com/RobinLinus/snapdrop/issues/266 # https://github.com/RobinLinus/snapdrop/issues/159 #proxy_set_header X-Forwarded-For "0.0.0.0"; } }