<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">I’ll try recompiling nginx with that to see if that changes anything. <br />
<br />
Also, to be clear, I know that r.internalRedirect won’t happen. I actually stripped the access function down to almost it’s barest content to demonstrate the point and left that code in there just to demo what we do at the end of the route when we don’t just have a debug statement at the top of the function. Normally we either allow or deny the request and then just try to load the originally intended content for that block (though we have to internalRedirect to get that to work). Even without that internalRedirect statement in the code, just returning the object data with no other code in the function is returning an empty JS object.<br />
<br />
In fact, even your code is returning nothing. I just set it to this:<br />
<br />
<span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">function</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#a97a8c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">access</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">(</span><em style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">r</em><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">){ </span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">var</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">jObj</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">=</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d19a66;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">JSON</span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">.</span><span style="color:#d1673a;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">stringify</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">(</span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">r</span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">.</span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">args</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">) </span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">+</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#b9c87f;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">'\n'</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">;</span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">try</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> {</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">var</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">parseJSON</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">=</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d19a66;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">JSON</span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">.</span><span style="color:#d1673a;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">parse</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">(</span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">jObj</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">);</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> } </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">catch</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> (</span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">err</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">) {</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">r</span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">.</span><span style="color:#a97a8c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">return</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">(</span><span style="color:#5286b7;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">400</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">, </span><span style="color:#b9c87f;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">'Cannot parse jObj'</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">);</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">return</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">;</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> }</span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">r</span><span style="color:#c4bc3c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">.</span><span style="color:#a97a8c;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">return</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">(</span><span style="color:#5286b7;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">200</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">, </span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">jObj</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">);</span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">return</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">;</span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">}</span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">export</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> </span><span style="color:#cd8d4e;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">default</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px"> {</span><span style="color:#d9dbfc;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">access</span><span style="color:#ffffff;background-color:#383939;font-family:Menlo, Monaco, Courier New, monospace;font-size: 12px">}</span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="font-size: 12px"><br /></span><span style="color:#ffffff;background-color:#383939">When I </span><span style="color:#ffffff">submit a POST with vars, I still get an empty object in the response.</span></div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont"><br />
--<br />
Lance Dockins<br /></div>
</div>
<div name="messageReplySection">On Aug 11, 2021, 9:42 PM -0500, Sergey A. Osokin <osa@freebsd.org.ru>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">On Wed, Aug 11, 2021 at 09:38:50PM -0500, Lance Dockins wrote:<br />
<blockquote type="cite">Oh… and to reiterate, I get similarly empty object responses<br />
when access the variables and rawVariables objects. Most of<br />
them seem to be empty objects, actually.<br /></blockquote>
<br />
I'd recommend to enable nginx debugging log as I mentioned earlier.<br />
<br />
Thank you.<br />
<br />
--<br />
Sergey<br />
_______________________________________________<br />
nginx mailing list<br />
nginx@nginx.org<br />
http://mailman.nginx.org/mailman/listinfo/nginx</blockquote>
</div>
</body>
</html>