Hi,
I have a nginx.conf that contains something similar to the following:
location /a {
include /etc/nginx/uwsgi_params;
uwsgi_param UWSGI_SCRIPT some_uwsgi_script;
uwsgi_pass some_socket;
}
which calls "some_uwsgi_script" for requests going to "/a". What I need to do though is to:
1. before running "some_uwsgi_script", run a lua script
2. the lua script will then either:
a) call ngx.exit(ngx.HTTP_FORBIDDEN), which makes nginx return 403 to the user
b) or finishes with a simple return (which means some_uwsgi_script should be executed)
What I was hoping would happen is that if I added something like "content_by_lua_file some_lua_script" as the very first line of the "/a" block, it would run the lua script and once the lua returns, it would run my "some_uwsgi_script", but it does not look like doing so would do the trick! Am I doing something wrong?
Any help is appreciated.
Thanks,