# serve locale index from prebuilt static files 
location = /html5client/locales/ {
  alias /usr/share/bigbluebutton/html5-client/locales/;
  autoindex on;
  autoindex_format json;

  # Prevent browsers from caching
  add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
  add_header Pragma "no-cache";
  add_header Expires 0;
}

# running from source (npm start)
location /html5client/ {
  rewrite /html5client/(.*) /$1 break;
  gzip_static on;
  proxy_pass http://10.7.7.1:3000/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_set_header Host $host;
}

