puma-dev
puma-dev copied to clipboard
Unable to proxy to another host
Hi!
According to the readme, Puma Dev supports proxying requests to another host which is something I need. However if I try to use it I get an error:
parse 192.168.1.6:8082: first path segment in URL cannot contain colon
Using macOS 10.15.4 and puma-dev 0.13 (go1.13.7)
Any ideas?
Try putting //192.168.1.6:8082
in your app definition file. It know it's funky, but it'll trick url.Parse
into working correctly.
It's likely that an older golang version (<1.12) correctly parsed the url without the protocol separator. We should add tests and ensure we accept the x.x.x.x:y
format.
https://github.com/puma/puma-dev/blob/5af31818ea9f4ebc2c30baa2e8b3d238bff07888/dev/app.go#L381-L401
Yeah looks like that worked, thanks!
Adding the //
gives me a Bad Gateway response. I've tested that I can get to the IP on that port without puma-dev and it works fine, so the bad gateway occurs within puma-dev. I'd gladly accept some pointers! :D
Figured it out. I needed to be explicit about the scheme, so add http://
to the front of the ip:port
.