Sorry for being delay in response. I was out of the office. I have passed the above information to my dev team, and I will come back to you as they reply to me.
A quick side question, our dev team, is wondering if you are running your server with root access
we don't think that running the project as root is a good idea. (root permissions are needed to access port 443)
have you tried to use 3000 port?
I just spent 30 minutes trying every possible workaround other than forking your CLI. Scratch that... I did dig into your CLI and you're enforcing http even though you're on an Express JS backbone, which should have no problem with https.
The core issue is that Slice Machine's development server is intentionally HTTP-only for local development, but Chrome's aggressive HTTPS enforcement is overriding this. In other words, once I've connected to https using
"dev": "next dev --experimental-https
In package.json, Chrome's internal HSTS client can be... quite persistent. So if I've been doing something wild like, I dunno, attaching a descope authorization scheme to the front end of an app... (annoyed and sarcastic face here)... I now have to run Slicemachine in Firefox for all of eternity or suffer endless HSTS redirects.
In short, can we join the 2020s here, folks? Or are you going to wait until Next 15 takes off the experimental flag and runs https by default, and it becomes an emergency?
Thanks for your message. Just to be sure I'd like to understand a bit more: is your issue only about the Slice Simulator? Or also about running Slice Machine in general.
For the Slice Simulator only, this workaround will work:
Set "dev": "next dev --experimental-https"
Edit your Slice Simulator URL in slicemachine.config.json file to add https instead of http
That was the first thing I tried. As the OP mentioned two years ago - the CLI is forcing http. For now I just have to run slicemachine in a non-chrome browser, though I could probably run an alternate /hosts setup to accomplish the same thing. Maybe. Chrome is pretty persnickety about hsts.
Hi @ian6, thanks for the feedback. It seems like this issue is not limited to the Slice Simulator, correct?
From what I understand, you have a localhost website with HSTS enabled. That config forces any localhost website to use HTTPS regardless of its port, including Slice Machine at localhost:9999.
Slice Machine does not currently support HTTPS. The start-slicemachine CLI does not have an option to specify HTTPS or provide a certificate.
As a workaround, you can run Slice Machine in a Chrome incognito browser. Doing so seems to ignore cached HSTS settings for localhost.
I will relay this information to the Slice Machine team so they understand the issue and can add it to the roadmap.