From b2bb0cc3534317152de4a71b2f44ea4af62259be Mon Sep 17 00:00:00 2001 From: Mani Shooshtari Date: Fri, 29 Apr 2022 12:37:38 +0300 Subject: [PATCH] add support for running pwa locally --- containers/nginx/dev-ssr.conf.tpl | 4 ++++ containers/nginx/dev.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/containers/nginx/dev-ssr.conf.tpl b/containers/nginx/dev-ssr.conf.tpl index d312aaeb1..3fd1638fc 100644 --- a/containers/nginx/dev-ssr.conf.tpl +++ b/containers/nginx/dev-ssr.conf.tpl @@ -119,6 +119,10 @@ server { add_header 'Access-Control-Allow-Origin' *; } + location ~ ^/(manifest.webmanifest|ngsw-worker.js|ngsw.json|safety-worker.js|worker-basic.min.js)$ { + rewrite /var/www/Minds/front/dist/browser/en/$1 last; + } + location ~ (composer.json|composer.lock|.travis.yml){ deny all; } diff --git a/containers/nginx/dev.conf b/containers/nginx/dev.conf index afce0cafd..bee640c7d 100644 --- a/containers/nginx/dev.conf +++ b/containers/nginx/dev.conf @@ -53,6 +53,10 @@ server { add_header 'Access-Control-Allow-Origin' *; } + location ~ ^/(manifest.webmanifest|ngsw-worker.js|ngsw.json|safety-worker.js|worker-basic.min.js)$ { + rewrite /var/www/Minds/front/dist/browser/en/$1 last; + } + location ~ (composer.json|composer.lock|.travis.yml){ deny all; }