host Plug.Conn @TheAnhLe.
, Phoenix url Endpoint :
config :my_app, MyAppWeb.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "example.com", port: 80],
:
MyAppWeb.Endpoint.url
# => "http://localhost:4000"
Application.get_env(:my_app, MyAppWeb.Endpoint)[:url][:host]
# => "localhost"
localhost .
: Phoenix, 1.3, MyAppWeb MyApp.