From 0bc7ffe0a1a8ae9fd497fe11d2ac399eb33b6da1 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 7 Sep 2022 10:40:00 +0100 Subject: [PATCH] Update preview endpoint to be prefixed with /app to not require an updated proxy config --- hosting/nginx.dev.conf.hbs | 4 ---- hosting/nginx.prod.conf.hbs | 4 ---- .../design/[screenId]/_components/AppPreview.svelte | 2 +- packages/server/src/api/routes/static.ts | 2 +- packages/server/src/api/routes/tests/static.spec.js | 4 ++-- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 20c4d3d182..148007d958 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -65,10 +65,6 @@ http { proxy_pass http://{{ address }}:4001; } - location /preview { - proxy_pass http://{{ address }}:4001; - } - location /builder { proxy_pass http://{{ address }}:3000; rewrite ^/builder(.*)$ /builder/$1 break; diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index 0ff986d0a7..c57fce291c 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -88,10 +88,6 @@ http { proxy_pass http://$apps:4002; } - location /preview { - proxy_pass http://$apps:4002; - } - location = / { proxy_pass http://$apps:4002; } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index eb8743bf39..7a16bb6ae2 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -290,7 +290,7 @@