title: How to enable auth_basic only for POST requests in Nginx?
body: <p>I am getting the following error message in Nginx :</p>
  
  <blockquote>
    <p>"satisfy" directive is not allowed here</p>
  </blockquote>
  
  <p>Here is my nginx config for basic HTTP authentication : </p>
  
  <pre><code>location / {
  
                     limit_except GET {
                        satisfy any;
  
                        allow  some_address;
                        allow  another_address;
                        deny  all;
  
  
                        auth_basic "Elasticsearch Authentication";
                        auth_basic_user_file some_file;
                     }
  
      }
  </code></pre>
  
  <p>This configuration is inspired from <a href="https://serverfault.com/questions/128538/nginx-basic-auth-only-for-post">this question</a> and <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_except" rel="nofollow noreferrer">Nginx docs</a>. Can you help me solve this problem ?</p>