# Yesod at https://example.org/vr/ (any path works: the app only uses # relative URLs). Include this from your site's TLS server block; it proxies to # the Node app on PORT (8095 by default). # # Nothing about visitors is logged here: no access log (who loaded the page, # when, from where), and only critical errors, which don't name visitors. location = /vr { access_log off; error_log /dev/null crit; return 301 /vr/; } location /vr/ { access_log off; error_log /dev/null crit; proxy_pass http://127.0.0.1:8095/; proxy_http_version 1.1; # socket.io upgrades to a WebSocket for signaling. proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; 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 1h; proxy_send_timeout 1h; client_max_body_size 16k; # Compress scripts, JSON and 3D models (.glb, and .vrm which is served as # octet-stream): the libraries shrink ~75%, avatars and hands 50-85%. # Images are already compressed and left alone. gzip on; gzip_proxied any; gzip_vary on; gzip_comp_level 5; gzip_min_length 1024; gzip_types application/javascript text/css application/json model/gltf-binary application/octet-stream; }