title: How to disable TRACE in niginx conf file
body: <p>Assume my web app is hosted on <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a>, I am testing my HTTP verbs on my server, I have nginx there, </p>
  
  <p>curl -v -X TRACE <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a></p>
  
  <p>For above I am getting a response. Instead, I should get 404 or other.</p>
  
  <p>I had tried the below conf in Nginx server location block. </p>
  
  <pre><code>if ($request_method !~ ^(GET|HEAD|POST)$ ){
      return 444;
   }
  </code></pre>
  
  <p>This works for me but TRACE is still allowed. How should I stop it? </p>