V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wuwuta170
V2EX  ›  Node.js

用 vue 部署的 这个不知道怎么解决了 代码里也没找到使用 websocket 请求的地方,不知道为什么会请求到内网地址

  •  
  •   wuwuta170 · 30 天前 · 266 次点击
    Mixed Content: The page at 'https://**.**/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://10.0.20.2:8080/ws'. This request has been blocked; this endpoint must be available over WSS.
    2 条回复    2024-06-23 23:17:29 +08:00
    A3m0n
        1
    A3m0n  
       8 天前
    看看有没有 iframe 。
    zhhbstudio
        2
    zhhbstudio  
       2 天前
    根据之前的经验,有人在服务器上用的 npm run dev ...
    npm run build 之后,把 dist 目录下的文件甩过去就行了。然后 nginx 配置 root 指向 dist 目录。如果路由用的 history 模式,请相应调整 nginx 配置。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1756 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 00:01 · PVG 08:01 · LAX 17:01 · JFK 20:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.