title: How to get the current url in phoenix framework
body: <p>I would like to know the current url with elixir / phoenix framework, how I can get this ?</p>
  <p><strong>Edit #1</strong>:</p>
  <p>My nginx config file:</p>
  <pre><code>server {
          client_max_body_size 100M;
  
          listen  80;
  
          server_name *.example.dev *.example2.dev
  
          access_log  /usr/local/var/log/nginx/baby-access.log;
          error_log   /usr/local/var/log/nginx/baby-error.log;
  
  
          location / {
              proxy_pass http://127.0.0.1:4000;
          }
  }
  </code></pre>
  <p>Code:</p>
  <pre><code>Atom.to_string(conn.scheme) &lt;&gt; &quot;://&quot; &lt;&gt; (Enum.into(conn.req_headers, %{}) |&gt; Map.get(&quot;host&quot;)) &lt;&gt; conn.request_path
  </code></pre>
  <p>That example returns <a href="http://127.0.0.1:4000/" rel="nofollow noreferrer">http://127.0.0.1:4000/</a>, I would like to get <a href="http://www.example.dev/" rel="nofollow noreferrer">http://www.example.dev/</a></p>
  <p>I'm in development mode.</p>