[英]Socket.io with YARP
When trying establish a connection to my socket.io service, through yarp, I am getting connection_error:尝试通过 yarp 建立与我的 socket.io 服务的连接时,我收到 connection_error:
I noticed there are proper configurations used in other Reversed Proxy solutions that are well documented in Socket.io website: https://socket.io/docs/v4/reverse-proxy/我注意到在其他反向代理解决方案中使用了正确的配置,这些配置在 Socket.io 网站上有很好的记录: https ://socket.io/docs/v4/reverse-proxy/
However, I can't "translate" what they are doing to YARP.但是,我不能“翻译”他们对 YARP 所做的事情。 Does anyone know if this is possible?
有谁知道这是否可能?
Thanks in advance提前致谢
I guess stackoverflow was my rubberduck this time...我猜这次stackoverflow是我的橡皮鸭......
I checked in postman the request that was being made through my Yarp Server and turns out it wasn't even hitting the correct path.我在邮递员中检查了通过我的 Yarp 服务器发出的请求,结果发现它甚至没有找到正确的路径。 For yarp to connect to a socket.io server you have to use this kind of path in your configuration file:
要让 yarp 连接到 socket.io 服务器,您必须在配置文件中使用这种路径:
It seems that a sokcetio request uses it's own path, so you have to make your reverse proxy match the beggining "socket.io/"似乎 sokcetio 请求使用它自己的路径,所以你必须让你的反向代理匹配开始的“socket.io/”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.