meet.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. {{ if not (.Env.ENABLE_FLOC | default "0" | toBool) }}
  18. add_header Permissions-Policy "interest-cohort=()";
  19. {{ end }}
  20. location = /config.js {
  21. alias /config/config.js;
  22. }
  23. location = /interface_config.js {
  24. alias /config/interface_config.js;
  25. }
  26. location = /external_api.js {
  27. alias /usr/share/jitsi-meet/libs/external_api.min.js;
  28. }
  29. # ensure all static content can always be found first
  30. location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
  31. {
  32. add_header 'Access-Control-Allow-Origin' '*';
  33. alias /usr/share/jitsi-meet/$1/$2;
  34. }
  35. {{ if $ENABLE_COLIBRI_WEBSOCKET }}
  36. # colibri (JVB) websockets
  37. location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) {
  38. proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
  39. proxy_http_version 1.1;
  40. proxy_set_header Upgrade $http_upgrade;
  41. proxy_set_header Connection "upgrade";
  42. tcp_nodelay on;
  43. }
  44. {{ end }}
  45. # BOSH
  46. location = /http-bind {
  47. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
  48. proxy_set_header X-Forwarded-For $remote_addr;
  49. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  50. }
  51. {{ if $ENABLE_XMPP_WEBSOCKET }}
  52. # xmpp websockets
  53. location = /xmpp-websocket {
  54. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/xmpp-websocket;
  55. proxy_http_version 1.1;
  56. proxy_set_header Connection "upgrade";
  57. proxy_set_header Upgrade $http_upgrade;
  58. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  59. proxy_set_header X-Forwarded-For $remote_addr;
  60. tcp_nodelay on;
  61. }
  62. {{ end }}
  63. location ~ ^/([^/?&:'"]+)$ {
  64. try_files $uri @root_path;
  65. }
  66. location @root_path {
  67. rewrite ^/(.*)$ / break;
  68. }
  69. {{ if .Env.ETHERPAD_URL_BASE }}
  70. # Etherpad-lite
  71. location /etherpad/ {
  72. proxy_http_version 1.1;
  73. proxy_set_header Upgrade $http_upgrade;
  74. proxy_set_header Connection 'upgrade';
  75. proxy_cache_bypass $http_upgrade;
  76. proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
  77. proxy_set_header X-Forwarded-For $remote_addr;
  78. proxy_buffering off;
  79. }
  80. {{ end }}
  81. {{ if .Env.SPOT_URL_BASE }}
  82. # Spot
  83. location ~ ^/spot(/?)(.*)$ {
  84. proxy_pass {{ .Env.SPOT_URL_BASE }}/$2$is_args$args;
  85. proxy_set_header X-Forwarded-For $remote_addr;
  86. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  87. proxy_buffering off;
  88. tcp_nodelay on;
  89. }
  90. {{ end }}