增加自动http协议

master
yutent 2023-11-14 18:43:50 +08:00
parent 7fb2479033
commit 45e0ad2979
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ std.out = function (...args) {
const HMR_SCRIPT = `
<script>
!(function http_hmr(){
var ws = new WebSocket(\`ws://\${location.host}/ws-http-hmr\`)
var ws = new WebSocket(\`\${location.protocol === 'https:' ? 'wss' : 'ws'}://\${location.host}/ws-http-hmr\`)
ws.addEventListener('open', function (r) {
if(http_hmr.closed){
delete http_hmr.closed

View File

@ -2,7 +2,7 @@
"name": "simple-http",
"displayName": "simple http",
"description": "🔥 简单的http服务器, 方便临时调试html",
"version": "1.5.1",
"version": "1.5.2",
"publisher": "yutent",
"author": "Yutent [@yutent]",
"icon": "logo.png",