Skip to content

Commit

Permalink
fix: skip modyfing request path
Browse files Browse the repository at this point in the history
  • Loading branch information
Artonus committed Mar 22, 2024
1 parent 8f38cab commit 887aa50
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/OcelotGateway/Services/GatewayConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ public void CreateDynamicRoute(GatewayAddNetAppEntryMessage msg)
},
ClusterId = clusterCfg.ClusterId
};
var routeSocketIoCfg = new RouteConfig
{
RouteId = msg.NetAppName + "SocketIO-Route",
Match = new()
{
Path = "/socket.io/{**remainder}"
},
ClusterId = clusterCfg.ClusterId //
};
// var routeSocketIoCfg = new RouteConfig
// {
// RouteId = msg.NetAppName + "SocketIO-Route",
// Match = new()
// {
// Path = "/socket.io/{**remainder}"
// },
// ClusterId = clusterCfg.ClusterId //
// };
// transforms allow us to change the path that is requested like below to replace direct forwarding
routeCfg = routeCfg.WithTransformPathRemovePrefix($"/{msg.NetAppName}");
//routeCfg = routeCfg.WithTransformPathRemovePrefix($"/{msg.NetAppName}");

clusterList.Add(clusterCfg);
routeList.Add(routeCfg);
routeList.Add(routeSocketIoCfg);
//routeList.Add(routeSocketIoCfg);

_inMemoryConfigProvider.Update(routeList, clusterList);

Expand Down
96 changes: 96 additions & 0 deletions util/websocket_tester/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 887aa50

Please sign in to comment.