浏览代码

web: support loading pwa-worker.js from subdir (#1517)

Aaron van Meerten 2 年之前
父节点
当前提交
7c50cb7079
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      web/rootfs/defaults/meet.conf

+ 7 - 0
web/rootfs/defaults/meet.conf

@@ -140,6 +140,13 @@ location @root_path {
 }
 }
 
 
 {{ if $ENABLE_SUBDOMAINS }}
 {{ if $ENABLE_SUBDOMAINS }}
+    # Matches /(TENANT)/pwa-worker.js or /(TENANT)/manifest.json to rewrite to / and look for file
+    location ~ ^/([^/?&:'"]+)/(pwa-worker.js|manifest.json)$ {
+        set $subdomain "$1.";
+        set $subdir "$1/";
+        rewrite ^/([^/?&:'"]+)/(pwa-worker.js|manifest.json)$ /$2;
+    }
+
     location ~ ^/([^/?&:'"]+)/config.js$ {
     location ~ ^/([^/?&:'"]+)/config.js$ {
         set $subdomain "$1.";
         set $subdomain "$1.";
         set $subdir "$1/";
         set $subdir "$1/";