nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Allow overriding the cache-control header when using cached functions

Open ronenteva opened this issue 3 years ago • 0 comments

Describe the feature

Once cache is used, the cache-control header can't be set manually.

routeRules: {
    '/api/test': {cache: {maxAge: 60}, headers: {'cache-control': 'public, max-age=60, stale-while-revalidate=30'}}
  }

results in cache-control: max-age=60

Additional information

  • [ ] Would you be willing to help implement this feature?

ronenteva avatar Nov 27 '22 00:11 ronenteva