From 7c50cb7079bf7f8c38b2753160ded75169ee6025 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Mon, 3 Apr 2023 14:10:01 -0500 Subject: [PATCH] web: support loading pwa-worker.js from subdir (#1517) --- web/rootfs/defaults/meet.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index cf1eac4..8fc7beb 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -140,6 +140,13 @@ location @root_path { } {{ 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$ { set $subdomain "$1."; set $subdir "$1/";