title: How to stop Next.js api from overriding my ETag header
body: <p>I am new to Next.js, but it looks like Next.js is overriding my ETag header. I am editing ETag because I connect my server to S3 and want to use S3 Object's Etag for cache controlling.</p>
  <p>To reproduce it, in below code, it sets ETag header. But when I call this api from browser, ETag header is changed.</p>
  <p><code>@/pages/api/test.ts</code></p>
  <pre><code>import { NextApiHandler } from 'next'
  
  const handler: NextApiHandler = async (req, res) =&gt; {
      res.setHeader(&quot;ETag&quot;, &quot;5cja7f7wbfb1c657e82dd4ssfj8sf0c6&quot;);
      return res.send(&quot;Some data here&quot;);
  }
  
  export default handler;
  </code></pre>
  <p>I tried to turn off etags generating in <code>next.config.js</code> but it won't help.</p>
  <pre><code>module.exports = {
      generateEtags: false,
  }
  </code></pre>
  <p>So I am looking for a way to solve this... better if we can disable it's ETag overriding...</p>