Skip to content

Static files Cache-Control maxAge hardcode #137

@SinaniG1996

Description

@SinaniG1996

Hi. I have encountered on issue that i cant change Cache-Control maxage value for static files (e. g. .ico, .png). It seems this is because in lib/app:75 maxAge value hardcoded for such files.
Could you please move Cache ttl to config.
Something like this:

pluginOptions: {
    ssr: {
      ...
      // See https://ssr.vuejs.org/guide/build-config.html#externals-caveats
      nodeExternalsWhitelist: [/\.css$/, /\?vue&type=style/],
      // Static files Cache-Control maxAge value
      staticCacheTtl: 1000 * 60 * 60 * 24 * 30, <---------------
      // Function to connect custom middlewares
      extendServer: app => {
        const cookieParser = require('cookie-parser')
        app.use(cookieParser())
      },
      ...
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions