Closed jacobm-splunk closed 8 months ago
Amazing work, will review ASAP!
A couple of nits, other than that - it looks great.
Didn't we discuss the need to add in the endpoints in which to forward, or are you simple just doing a straight passthrough for any endpoint?
I have a user add the configuration for their endpoints and then register a handler on each one of those:
// Handle Websockets
for websocket := range wiretapConfig.WebsocketConfigs {
mux.HandleFunc(websocket, handleWebsocket)
}
If that's not doing what I expect it to do, then I can totally change it, but since the websocket is opened through a http request to a specific endpoint, then I think this should work?
This MR aims to add support for proxying websockets to wiretap.
It skips validation on this endpoint as OpenAPI does not really support websocket specification.
I am not the most familiar with gorilla/websocket so I may have missed something.