My client have a website which shortens the url. Recently we are getting many spam requests. To sort this out we need to log the url which are posting. For example if someone is shortening www.google.com we need to log this in Nginx access log. I am not sure this can be done. If it is possible we can create a shell script to block the url automatically from posting. I will appreciate your help.
1 Answer
I think the $arg_
directive is only populated with the parameters from the request line, so, you might either want to move from POST
to GET
requests, or log the data from with your app.
If you do move from POST to GET, then you could use the custom log_format
within nginx to log the individual args.