How to use clusters with multiple protocols on the same port #1459
-
Hello! I have a question how to handle ports that allow multiple protocols such as http and ws, or https and wss. In the cluster/address I should put in a full URL such as https://xxx/, but then i don't know the protocol that the upstream used. So something like
Both http and ws are allowed in the YARP server and should forward to the cluster with the corresponding protocol. What would be the best to achieve that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
YARP will proxy both HTTP and WebSocket traffic by default (it will handle the HTTP => WebSocket upgrade for you). A minimal configuration like you shared is sufficient to enable both protocols. |
Beta Was this translation helpful? Give feedback.
YARP will proxy both HTTP and WebSocket traffic by default (it will handle the HTTP => WebSocket upgrade for you).
A minimal configuration like you shared is sufficient to enable both protocols.