在 2019年7月17日，上午2:56，DevX <naid...@gmail.com> 写道：Hi,I'm using lua script to perform some authorization before proxy passing the requests. I see that we have two directives content_by_lua_block and access_by_lua_block but couldn't understand the exact differences between both.Please help in understanding the differences between both and which directive best suits a scenario.Thanks.
I have an example:
I need to use fastcgi_pass: php-fpm.sock to handle php files, and I want to add CORS headers, so I should use access_by_lua_block, not content_by_lua_block. Because latter will return response before php-fpm.sock could handle the request.