sapper dev on non-localhost domain with https
Closed this issue · 1 comments
Describe the bug
running sapper in development mode on custom domain with https blocks sapper-dev-client
to run properly and as the result HMR doesn't work.
Logs
running on dockerised nginx:
To Reproduce
quick way
npx degit "sveltejs/sapper-template#rollup" sapper-on-https
cd sapper-on-https
npm install
npm run dev
and on new terminal
npm install -g localtunnel
lt -p 3000 -s sapper -o
slightly longer way
repo: widyakumara/sapper.demo
Expected behavior
sapper development mode should run on both http & https
Information about your Sapper Installation:
System:
OS: macOS 10.15.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 982.38 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.4 - ~/.nvm/versions/node/v12.18.4/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.6 - ~/.nvm/versions/node/v12.18.4/bin/npm
Browsers:
Chrome: 85.0.4183.121
Firefox: 79.0
Safari: 13.1.2
Severity
blocking if you want to develop locally using https & custom domain
This is something that was already done in #1379 and then undone in #1453 because it broke the typical case where the dev reload server on port 10000 is still HTTP. Unless this localtunnel service is doing something truly mysterious, I doubt #1589 would really fix this for you anyway - you might no longer be getting a mixed content error, but instead you'd be unable to access the dev reload server at https://sapperhttps.demo:10000
.
There are outstanding issues - like #384 - for improving the experience with HTTPS, but just switching to trying to access the dev reload server over HTTPS without ensuring it's available on that port over HTTPS isn't the correct solution.