我运行的服务不支持HTTPS或WSS,遗憾的是我无法修改服务。作为一种解决方法,我使用nginx作为反向代理来为HTTP连接添加SSL,但是webapp不再有效。 Chrome开发工具会出现此错误:
Mixed Content: The page at 'https://*****.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://******.com/service'. This request has been blocked; this endpoint must be available over WSS.
因此,网页本身会加载,但内容不会加载。
nginx还有办法在websocket端口上运行反向代理吗?