sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

Not working in localhost

Open luin opened this issue 1 year ago • 0 comments

Bug report

Packages affected

  • [ ] sandpack-client
  • [x] sandpack-react

Description of the problem

Safari doesn't allow loading https content when the host location is http. Due to the fact, when running a site locally at http://localhost:port, Safari refuses to display the preview.

CleanShot 2024-02-01 at 13 21 11@2x

I tried setting up a local proxy and specifying bundleURL, however, looks like Sandpack added a random ID to the hostname, so if the bundleURL is set to http://localhost:port, the final endpoint becomes http://randomid-localhost:port.

Your Environment

Software Name/Version
Sandpack-client version
Sandpack-react version 2.11.3
Browser Safari 17
Operating System macOS

luin avatar Feb 01 '24 05:02 luin