slogsdon / elixir-reverse-proxy

A Plug based, reverse proxy server written in Elixir.
https://hex.pm/packages/reverse_proxy
MIT License
147 stars 34 forks source link

Wishlist: how to get something running #9

Open davidw opened 7 years ago

davidw commented 7 years ago

The docs are a bit sparse in terms of just getting something running that I can try out.

I want to, say, proxy http://localhost:3210 to http://example.com just to check things out and see how everything works. I just get 'bad request' responses from Cowboy when hitting localhost.

Thanks

davidw commented 7 years ago

Here's what I did:

config :reverse_proxy, upstreams: %{
  "foobar.local" => ["www.example.com"],
  "api." => {ReverseProxyTest.SuccessPlug, []} }

With foobar.local something I added to /etc/hosts

I also had to fiddle with the code because of this: https://github.com/slogsdon/elixir-reverse-proxy/issues/2