lijunlong
lijunlong
would you please prepare a small test case for this issue?
1. Which version of openresty do you use? 2. Did you build openresty yourself? 3. Did you install openresty from official repo?
You should use ngx.var.remote_addr directly. Go to https://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive for more details.
Are there any error logs? How did you test it?
The default path of nginx in openresty image is /usr/local/openresty/nginx/sbin/nginx. I think there is something wrong with your dockerfile. You can enter into the docker container to check if everything...
you can write the json data into a file and check what is invalid in it.
would you please give an example of the json data
``` local cjson = require "cjson.safe" local invalidJson = '{"key": "value"' local req_json, error_encode = cjson.encode(invalidJson) print(req_json) print(error_encode) local res_json, error_decode = cjson.decode( req_json) ---> You should decode the encoded...
I think you have no idea about what are JSON encoding and JSON decoding. `local invalidJson = '{"key": "value"'` The above is a Lua string. You can encode the Lua...
I think it is a good idea. but we need a better function name.