coder / code-server

VS Code in the browser
https://coder.com
MIT License
68.46k stars 5.61k forks source link

[Bug]: Turn on the side preview function (Ctrl+Shift+V) does not work #5474

Closed leijue222 closed 2 years ago

leijue222 commented 2 years ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. tar -xvf code-server-4.4.0-linux-amd64.tar.gz
  2. edit ~/.config/code-server/config.yaml
  3. run

Expected

We can use the preview function to see a preview view of the .md file.

image

Actual

The preview view interface is blank. image

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

Are you accessing code-server over HTTPS?

Notes

I am using HTTP. My own environment cannot use HTTPS.

jsjoeio commented 2 years ago

I am using HTTP. My own environment cannot use HTTPS.

The preview renders in a webview. Webviews use Service Workers. Browsers require HTTPS or secure environments to use Service Workers. Sadly, there's nothing we can do on code-server's side. I suggest trying something like Caddy or NGINX, or even a simpler solution like ngrok or localtunnel.