Terminal.vue:90 Mixed Content: The page at 'https://localhost:49001/#/terminal/console?containerId=b471c005e884&title=SimpleDocker%20%E5%AE%B9%E5%99%A8%E7%BB%88%E7%AB%AF%E6%8E%A7%E5%88%B6%E5%8F%B0' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://localhost:49001/ws/api/container/terminal/8107896031ecdc7bac7b7774e23523b67373a264d836438b141a836b9378926d?containerId=b471c005e884&token=Bearer%20eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIyMDIzLTExLTA5VDA3OjM4OjQwLjU0NTYzMzU0MVoiLCJpYXQiOjE2OTk0MjkxMjAsInN1YiI6ImFkbWluIn0.JPqJE6lFOizcWmecuG-qdVnqKKTQt-pUd65gT5RPIwA'. This request has been blocked; this endpoint must be available over WSS.
nginx配置如下
upstream simpleDocker {
server 192.168.100.1:9001;
}
Terminal.vue:90 Mixed Content: The page at 'https://localhost:49001/#/terminal/console?containerId=b471c005e884&title=SimpleDocker%20%E5%AE%B9%E5%99%A8%E7%BB%88%E7%AB%AF%E6%8E%A7%E5%88%B6%E5%8F%B0' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://localhost:49001/ws/api/container/terminal/8107896031ecdc7bac7b7774e23523b67373a264d836438b141a836b9378926d?containerId=b471c005e884&token=Bearer%20eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIyMDIzLTExLTA5VDA3OjM4OjQwLjU0NTYzMzU0MVoiLCJpYXQiOjE2OTk0MjkxMjAsInN1YiI6ImFkbWluIn0.JPqJE6lFOizcWmecuG-qdVnqKKTQt-pUd65gT5RPIwA'. This request has been blocked; this endpoint must be available over WSS.
nginx配置如下
upstream simpleDocker { server 192.168.100.1:9001; }
map $http_upgrade $connection_upgrade { default upgrade; '' close; }
server { listen 49001 ssl http2; server_name 域名; ssl_certificate /etc/nginx/ssl/域名_bundle.crt; ssl_certificate_key /etc/nginx/ssl/域名.key;
if ($http_user_agent ~* "360Spider|JikeSpider|Spider|spider|bot|Bot|2345Explorer|curl|wget|webZIP|qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot|NSPlayer|bingbot") { return 403; }
location / { proxy_pass http://simpleDocker; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr;
}
}