Misdirected Request Plug
If multiple HTTP/2 applications with the same TLS certificate are built, the browser tries to open all of the domains using the same connection. If there is a TLS Passthrough Load Balancer in Front, this will result in a request that is sent to the wrong application.
To solve this, a response of 421 Misdirected Request can be sent and the
browser will retry using a new connection.
Installation
The package can be installed by adding plug_misdirected_request to your list
of dependencies in mix.exs:
def deps do
[
{:plug_misdirected_request, "~> 1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. The docs can be found at https://hexdocs.pm/plug_misdirected_request.