Is it possible to reject all nginx request, which don't send basic authentication data with them?
I have requests like this:
xxx.xxx.xxx.xxx - - [24/Oct/2012:10:32:12 +0200] "POST /path HTTP/1.1" 401 1387 "-" "Apache-HttpClient/4.1.1 (java 1.5)" "-"
xxx.xxx.xxx.xxx - paul [24/Oct/2012:10:32:12 +0200] "POST /path HTTP/1.1" 200 192 "-" "Apache-HttpClient/4.1.1 (java 1.5)" "-"
and i want reject the first one, which don't provide the user. As you can see it already sends the 401 HTTP code, but this code is generated not directly from nginx but from an underlying application server. What I want to do is to directly deny it in nginx. Is there a way to check if a user has been provided?
And is this possible without setting up normal basic authentication directly in nginx?