title: make endpath to lowercase in nginx using lua module
body: <p>I want to make request url to lowercase before setting it for proxy pass.</p>
  <p>here is my nginx file</p>
  <pre><code>location ^~ /admin/(?&lt;endpath&gt;.*)
              {
                  set_by_lua     ngx.var.endpath string.lower(ngx.var.endpath)
                  proxy_pass     http://api.sample.com/api/portal/admin/$endpath$is_args$args;
              }
  </code></pre>
  <p>But I am getting error: <strong>invalid variable name &quot;ngx.var.endpath&quot;</strong></p>