Skip to content

Instantly share code, notes, and snippets.

@xolan
xolan / plug_traefik.ex
Created July 18, 2018 11:58
Handle X-Forwarded-Prefix with Plug.Traefik
defmodule Plug.Traefik do
use Plug.Builder
@assets_dir System.cwd <> "/priv/web/assets/"
plug Plug.Static, at: "/assets", from: @assets_dir
plug :x_forwarded_prefix
def x_forwarded_prefix(conn, _) do
register_before_send(conn, fn(conn) ->
@xolan
xolan / keybase.md
Created June 28, 2017 08:15
keybase.md

Keybase proof

I hereby claim:

  • I am xolan on github.
  • I am xolan (https://keybase.io/xolan) on keybase.
  • I have a public key ASAB2ARaTMXexFEMjdqtBMqu1Nom0H9kmjuu4Go2l6O3gQo

To claim this, I am signing this object: