Skip to content

Commit

Permalink
perf: remove no-transform to make compression work
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed Jul 16, 2024
1 parent cdcb9ad commit 2d2306a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions nitroSWPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ export function createNitroSWPreset(config: SWPresetConfig): NitroConfig {
getCacheControl: (filename: string): string =>
filename.startsWith("_nuxt/") &&
filename !== "_nuxt/builds/latest.json"
? "public, immutable, max-age=31536000, no-transform"
: "public, max-age=30, no-transform",
? "public, immutable, max-age=31536000"
: "public, max-age=30",
getContentType: (filename: string): string =>
contentType(path.extname(filename)) || "application/octet-stream",
shouldIncludeAssetInArchive: (
Expand Down
12 changes: 6 additions & 6 deletions public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ https://:project.pages.dev/*
X-Robots-Tag: noindex

/*
Cache-Control: public, max-age=300, no-transform, stale-while-revalidate=86400, stale-if-error=604800
Cache-Control: public, max-age=300, stale-while-revalidate=86400, stale-if-error=604800
Content-Security-Policy: __CSP_DIRECTIVES_HEADER__
Permissions-Policy: camera=(), document-domain=(), geolocation=(), interest-cohort=(), microphone=()
# https://api.nature.global/ is omitted for default Link header, as it may differ by page
Expand All @@ -11,27 +11,27 @@ https://:project.pages.dev/*
/sw.js
! Cache-Control
! Link
Cache-Control: public, max-age=30, no-transform
Cache-Control: public, max-age=30

/server.*
! Cache-Control
! Link
Cache-Control: public, immutable, max-age=31536000, no-transform
Cache-Control: public, immutable, max-age=31536000

/assets.*
! Cache-Control
! Link
Cache-Control: public, immutable, max-age=31536000, no-transform
Cache-Control: public, immutable, max-age=31536000

/_nuxt/*
! Cache-Control
! Link
Cache-Control: public, immutable, max-age=31536000, no-transform
Cache-Control: public, immutable, max-age=31536000

/_nuxt/builds/latest.json
! Cache-Control
! Link
Cache-Control: public, max-age=30, no-transform
Cache-Control: public, max-age=30

/favicon.*
! Link
Expand Down

0 comments on commit 2d2306a

Please sign in to comment.