ws://${location.host}/xxx
)ws.onopen = () => {
ws.send(JSON.stringify({
headers: {
Authorization:
Bearer ${token}
}
}));
isConnected.value = true;
}
查看方法:在消息數據裏(不是標頭裏)
ws://${location.host}/xxx
)Bearer ${token}
shell腳本獲取腳本所在目錄 執行腳本的父目錄不一定是當前的工作目錄。 url=$(dirname $(readlink -f $0))