title: fastify set reply headers for all routes
body: <p>For every route I have to type the same headers as shown below. Is there a way to set these headers globally so that they are used by default for every route and can be overridden on a per-route basis?</p>
  <pre class="lang-js prettyprint-override"><code>fastify.post(&quot;/api/users&quot;, async (request, reply) =&gt; {
      try {
          reply
              .code(200)
               header(&quot;Access-Control-Allow-Origin&quot;, &quot;http://localhost:3000&quot;)
              .header(&quot;Access-Control-Allow-Headers&quot;, &quot;Origin, X-Requested-With, Content-Type, Accept&quot;)
              .header(&quot;Content-Type&quot;, &quot;application/json; charset=utf-8&quot;)
              .send();
      } catch (error) {
          reply
              .code(400)
              .header(&quot;Access-Control-Allow-Origin&quot;, &quot;http://localhost:3000&quot;)
              .header(&quot;Access-Control-Allow-Headers&quot;, &quot;Origin, X-Requested-With, Content-Type, Accept&quot;)
              .header(&quot;Content-Type&quot;, &quot;application/json; charset=utf-8&quot;)
              .send();
      }
  });
  </code></pre>