-
Expected Behavior / New FeatureI'm wondering if it's possible to have the same API endpoint supporting Example: {
"DownstreamPathTemplate": "/api/foo/{everything}",
"DownstreamScheme": [ "http", "ws" ],
"DownstreamHostAndPorts": [
{
"Host": "foo",
"Port": 19999
}
],
"UpstreamPathTemplate": "/api/foo/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello Gleidson, Firstly, the WebSocket protocol is indeed based on HTTP. Ocelot is currently capable of performing transformations for both HTTP/HTTPS schemes and WS/WSS schemes. However, there may be some limitations or specific configurations needed for WebSocket (WS/WSS) scheme transformations. Ocelot is unable to perform the following tasks:
Please let us know which gateways are able to convert protocols? |
Beta Was this translation helpful? Give feedback.
Hello Gleidson,
I'm curious about the questions you're asking us. What is your ultimate objective? Is there a reason you cannot deploy two instances on different ports?
Firstly, the WebSocket protocol is indeed based on HTTP.
Secondly, it's not advisable to mix multiple protocols associated with multiple ports of the same service instance.
Thirdly, Ocelot cannot transform WebSocket traffic to HTTP and vice versa due to its pipeline design restrictions, which only allow re-routing WebSocket traffic. However, in theory, a WebSocket to HTTP fallback is possible, but it would require specific settings.
Ocelot is currently capable of performing transformations for both HTTP/HTTPS schemes and W…