{"repo":"tallarium/reverse_proxy_plug","free":true,"listed":false,"github":"https://github.com/tallarium/reverse_proxy_plug","clone":"git clone https://github.com/tallarium/reverse_proxy_plug.git","description":"🔛 an Elixir reverse proxy Plug with HTTP/2, chunked transfer and path proxying support","language":"Elixir","stars":316,"topics":["elixir","plug","http","proxy","reverse-proxy","reverse-proxy-server","http-server","chunked-transmission"],"license":"MIT","category":"networking-infra","readme_excerpt":"ReverseProxyPlug A reverse proxy plug for proxying a request to another URL using a choice of Elixir HTTP client libraries. Perfect when you need to transparently proxy requests to another service but also need to have full programmatic control over the outgoing requests. Note: For websocket reverse proxying, see reverse proxy plug websocket. This project grew out of a fork of elixir-reverse-proxy. Advantages over the original include more flexible upstreams, zero-delay chunked transfer encoding support, HTTP2 support with Cowboy 2, several options for HTTP client libraries and focus on being a composable Plug instead of providing a standalone reverse proxy application. Installation Add reverse proxy plug to your list of dependencies in mix.exs : Then add an HTTP client library, one of: - HTTPoison - Tesla - Finch - Req and configure depending on your choice, e.g.: You can also set the config as a per-plug basis, which will override any global config. Either of those must be set, otherwise the system will attempt to default to the HTTPoison adapter or raise if it's not present. Usage The plug works best when used with Plug.Router.forward/2 . Drop this line into your Plug router: Now all requests matching /foo will be proxied to the upstream. For example, a request to /foo/baz made over HTTP will result in a request to http://example.com/bar/baz . You can also specify the scheme or choose a port: The :upstream option should be a well formed URI parseable by URI.parse/1 , or a ","default_branch":null,"files":null,"tree":[],"storefront":"/r/tallarium","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tallarium/reverse_proxy_plug/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}