title: Cloud Foundry environment variables not working inside nginx.conf
body: <p>I am trying to create a generic <code>nginx.conf</code> that does a <code>proxy_pass</code> depending on the environment.</p>
  
  <p>I am using fixture from cloud foundry staticfile-buildpack</p>
  
  <p><a href="https://github.com/cloudfoundry/staticfile-buildpack/tree/master/fixtures/pushstate_and_proxy_pass/" rel="nofollow noreferrer">https://github.com/cloudfoundry/staticfile-buildpack/tree/master/fixtures/pushstate_and_proxy_pass/</a></p>
  
  <p>I want to set a proxy pass depending on the environment variable.</p>
  
  <p>This is the code of the proxy.conf:</p>
  
  <p><code>location /api { proxy_pass {{env "MY_DEV_PROXY"}}; }</code></p>
  
  <p>I expect that MY_DEV_PROXY environment variable that I have previously set is resolved.</p>
  
  <p>Instead, when pushing my app to cloud foundry I get:</p>
  
  <p><strong>ERR 2019/02/19 08:18:39 [emerg] 88#0: directive "proxy_pass" is not terminated by ";" in /home/vcap/app/nginx/conf/includes/proxy.conf:1</strong></p>
  
  <p>When using a direct value instead of a variable:</p>
  
  <p><code>location /api { proxy_pass https://my-dev-proxy.com; }</code></p>
  
  <p>everything works fine.</p>
  
  <p>cf curl /v2/info &amp;&amp; cf version:</p>
  
  <p><code>{
     "description": "Cloud Foundry provided by Swisscom",
     "min_cli_version": "6.42.0",
     "min_recommended_cli_version": "latest",
     "api_version": "2.128.0",
     "osbapi_version": "2.14",
  }</code></p>
  
  <p><code>cf version 6.42.0+0cba12168.2019-01-10</code></p>