0

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
  • 1
    This should be handled at the application level. You don't want to blindly log POST data - it could contain passwords, credit card data, etc. You don't want to add a paid service in a year or two and get fined for a massive security breach.
    – ceejayoz
    Jan 21, 2014 at 21:04

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .