code-server 扩展无法显示,启动失败
报错‘crypto.subtle‘ is not available so webviews will not work的解决方法
查看出错log 提示:
'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context
这里解释一下,这里实际上是浏览器在访问 code-server 时候没有使用HTTPS 协议导致的,第一种解决方法就是自己搭建反向代理,用https 证书解决
这里讲一下第二种方法,开启chrome 的 unsafely-treat-insecure-origin-as-secure 功能
方法是进入chrome flag管理界面 chrome://flags/#unsafely-treat-insecure-origin-as-secure