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.