I’ll try recompiling nginx with that to see if that changes anything.

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.

In fact, even your code is returning nothing.  I just set it to this:

function access(r){
    var jObj = JSON.stringify(r.args) + '\n';

    try {
        var parseJSON = JSON.parse(jObj);
    } catch (err) {
        r.return(400, 'Cannot parse jObj');
        return;
    }

    r.return(200, jObj);

    return;
}

export default {access}


When I submit a POST with vars, I still get an empty object in the response.


--
Lance Dockins
On Aug 11, 2021, 9:42 PM -0500, Sergey A. Osokin <o...@freebsd.org.ru>, wrote:
> On Wed, Aug 11, 2021 at 09:38:50PM -0500, Lance Dockins wrote:
> > Oh… and to reiterate, I get similarly empty object responses
> > when access the variables and rawVariables objects.  Most of
> > them seem to be empty objects, actually.
>
> I'd recommend to enable nginx debugging log as I mentioned earlier.
>
> Thank you.
>
> --
> Sergey
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to