meet.conf 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
  2. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
  3. server_name _;
  4. client_max_body_size 0;
  5. root /usr/share/jitsi-meet;
  6. # ssi on with javascript for multidomain variables in config.js
  7. ssi on;
  8. ssi_types application/x-javascript application/javascript;
  9. index index.html index.htm;
  10. error_page 404 /static/404.html;
  11. # Security headers
  12. add_header X-Content-Type-Options nosniff;
  13. add_header X-XSS-Protection "1; mode=block";
  14. {{ if .Env.DEPLOYMENTINFO_SHARD }}
  15. add_header X-Jitsi-Shard {{ .Env.DEPLOYMENTINFO_SHARD }};
  16. {{ end }}
  17. location = /config.js {
  18. alias /config/config.js;
  19. }
  20. location = /interface_config.js {
  21. alias /config/interface_config.js;
  22. }
  23. location = /external_api.js {
  24. alias /usr/share/jitsi-meet/libs/external_api.min.js;
  25. }
  26. # ensure all static content can always be found first
  27. location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
  28. {
  29. add_header 'Access-Control-Allow-Origin' '*';
  30. alias /usr/share/jitsi-meet/$1/$2;
  31. }
  32. {{ if $ENABLE_COLIBRI_WEBSOCKET }}
  33. # colibri (JVB) websockets
  34. location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) {
  35. proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
  36. proxy_http_version 1.1;
  37. proxy_set_header Upgrade $http_upgrade;
  38. proxy_set_header Connection "upgrade";
  39. tcp_nodelay on;
  40. }
  41. {{ end }}
  42. # BOSH
  43. location = /http-bind {
  44. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
  45. proxy_set_header X-Forwarded-For $remote_addr;
  46. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  47. }
  48. {{ if $ENABLE_XMPP_WEBSOCKET }}
  49. # xmpp websockets
  50. location = /xmpp-websocket {
  51. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/xmpp-websocket;
  52. proxy_http_version 1.1;
  53. proxy_set_header Connection "upgrade";
  54. proxy_set_header Upgrade $http_upgrade;
  55. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  56. proxy_set_header X-Forwarded-For $remote_addr;
  57. tcp_nodelay on;
  58. }
  59. {{ end }}
  60. location ~ ^/([^/?&:'"]+)$ {
  61. try_files $uri @root_path;
  62. }
  63. location @root_path {
  64. rewrite ^/(.*)$ / break;
  65. }
  66. {{ if .Env.ETHERPAD_URL_BASE }}
  67. # Etherpad-lite
  68. location /etherpad/ {
  69. proxy_http_version 1.1;
  70. proxy_set_header Upgrade $http_upgrade;
  71. proxy_set_header Connection 'upgrade';
  72. proxy_cache_bypass $http_upgrade;
  73. proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
  74. proxy_set_header X-Forwarded-For $remote_addr;
  75. proxy_buffering off;
  76. }
  77. {{ end }}