Closed LdDl closed 7 months ago
yup, the WS reverse proxy doesn't support dynamic target yet. Your code looks feasible, have you tried and what's result?
Thanks for attention! I guess it works for my needs... I'll make end-user example (plain JS-client and Go-client) and provide more info on results.
done a bit of coding for today: https://github.com/yeqown/fasthttp-reverse-proxy/pull/40 I was struggling during doing client example, but it seems to work just fine
I would check later😀
Hello @yeqown I'm trying to achieve URL modification before proxing: my reverse proxy server should accept some data, process it and prepare wildcard for actual websocket server. Do you have any tips on how to achieve that? E.g.:
I suppose the line
ctx.Request.URI().SetPath(newPath)
won't affect dialing because of _dialer.Dial(w.option.target.String(), forwardHeader)_, right? Would it be correct to replace this line in your package with something like code below?and then in user defined server:
should work. If you could spot me some drawbacks / mistakes of such approach, I would appreciate it!