Rexy v0.1.0 ReverseProxy.Runner View Source

This module retreives everything from an upstream.

It provides the retreive function which takes care of getting and sending a response to the selected upstreams.

Link to this section Summary

Functions

Retreive either takes a tupple of a plug, and it’s options if we want to route to other plugs as a middleware

Link to this section Functions

Link to this function retreive(conn, upstream) View Source

Retreive either takes a tupple of a plug, and it’s options if we want to route to other plugs as a middleware.

Or we can give it a connection and a list of servers from which to fetch a response. (If we have multiple servers it rotates them in order to load balance) Otherwise it skips this step and fetches the response dirrectly. It sets the needed x-forwarded-header and deletes the unnecessary headers set.

Link to this function retreive(conn, servers, client \\ HTTPoison) View Source