PlugRedirectHttps

Redirect http to https behind a load balancer (or other reverse proxy).

If an X-Forwarded-Proto header is present and it is “http”, this plug will redirect requests to the https protocol using the X-Forwarded-Host with the path and query parameters of the current request.

From the client’s perspective the only change should be from http to https.

Usage is very easy

plug PlugRedirectHttps
Source

Summary

call(conn, opts)

Call this plug

init(opts)

Initialize this plug. Currently there are no supported options

Functions

call(conn, opts)

Call this plug.

Source
init(opts)

Initialize this plug. Currently there are no supported options.

Source