From 3d6848f5fdb3b367cabcf93358d1ba5cb9d21b69 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 5 Jul 2023 17:04:39 +0200 Subject: [PATCH] Added Portal development --https option support for Safari (#17213) no issue This --https option allows to test Portal in Safari when the site is hosted on https. --- .github/scripts/dev.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/scripts/dev.js b/.github/scripts/dev.js index 75b3878e5b..143dd03821 100644 --- a/.github/scripts/dev.js +++ b/.github/scripts/dev.js @@ -106,7 +106,19 @@ if (DASH_DASH_ARGS.includes('portal') || DASH_DASH_ARGS.includes('all')) { prefixColor: 'magenta', env: {} }); - COMMAND_GHOST.env['portal__url'] = 'http://localhost:4175/portal.min.js'; + + if (DASH_DASH_ARGS.includes('https')) { + // Safari needs HTTPS for it to work + // To make this work, you'll need a CADDY server running in front + // Note the port is different because of this extra layer. Use the following Caddyfile: + // https://localhost:4176 { + // reverse_proxy http://localhost:4175 + // } + + COMMAND_GHOST.env['portal__url'] = 'https://localhost:4176/portal.min.js'; + } else { + COMMAND_GHOST.env['portal__url'] = 'http://localhost:4175/portal.min.js'; + } } if (DASH_DASH_ARGS.includes('signup') || DASH_DASH_ARGS.includes('all')) {