title: Getting part of nginx url as "variable"?
body: <p>I currently have this rule in my <code>nginx</code> config:</p>
  
  <pre><code>location /tun {
  proxy_pass         http://url.domain.com/mp3.mp3;
    proxy_set_header  X-Real-IP  $remote_addr;
  }
  </code></pre>
  
  <p>Which i use for tunneling in a private project. However, i want to make it dynamic.</p>
  
  <p>I am looking for something like this:</p>
  
  <pre><code>location /tun/$URL$ {
  proxy_pass         $URL$;
    proxy_set_header  X-Real-IP  $remote_addr;
  }
  </code></pre>
  
  <p>So users can type in their own url's like that.</p>
  
  <p>I understand there are security flaws in this, but i really want to see this happening!</p>
  
  <p>Thanks in advance!</p>