content_by_lua_block deletes request body

28 views
Skip to first unread message

Coshgun Huseynov

unread,
May 14, 2018, 3:22:15 AM5/14/18
to openresty-en
Hello. I wanted to make some changes on existing nginx configuration. My previous configuration was like this:








Then I added content_by_lua_block as below:




My /serviceprovider actually accepts JSON request in POST. When I send request after adding lua block I get error message "Invalid JSON: Empty string", but It writes request body to file successfully. 

I think this lua block deletes request body after writing it to file. I only want that location block worked as usual but in addition to write request body to a file.

Reply all
Reply to author
Forward
0 new messages