export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook("afterResponse", (event) => {
    const statusCode = event.node.res.statusCode;
    if (statusCode === 404) {
      event.node.res.setHeader("X-Robots-Tag", "noindex, follow");
    }
  });
});
