From 09ef409f63ab5ccdbf2b1b8c242890b893ec021c Mon Sep 17 00:00:00 2001 From: cp-jagruti-a Date: Fri, 5 Jan 2024 10:10:29 +0530 Subject: [PATCH] Enhance : Unification in services page --- nuxt-frontend/nuxt.config.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nuxt-frontend/nuxt.config.js b/nuxt-frontend/nuxt.config.js index 75d8f4d58..42f286668 100644 --- a/nuxt-frontend/nuxt.config.js +++ b/nuxt-frontend/nuxt.config.js @@ -1,5 +1,7 @@ // https://nuxt.com/docs/api/configuration/nuxt-config import { defineNuxtConfig } from "nuxt/config"; +const yearInSeconds = 365 * 24 * 60 * 60; // 365 days * 24 hours * 60 minutes * 60 seconds + export default defineNuxtConfig({ app: { head: { @@ -34,5 +36,17 @@ export default defineNuxtConfig({ prerender: { failOnError: false, }, + routeRules: { + "/img/**": { + headers: { + "cache-control": `public,max-age=${yearInSeconds},s-maxage=${yearInSeconds}`, + }, + }, + "/_nuxt/**": { + headers: { + "cache-control": `public,max-age=${yearInSeconds},s-maxage=${yearInSeconds}`, + }, + }, + }, }, });