Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# cached forever

/assets/*.css
Cache-Control: public, max-age=604800, immutable
cache-control: public, max-age=604800, immutable

/assets/*.js
Cache-Control: public, max-age=604800, immutable
cache-control: public, max-age=604800, immutable


# favicon.png and global.css are checked into the repo and change infrequently
# will set them to cache forever on cloudflare, and manually purge if necessary
# will set to cache for one day in the browser

/favicon.png
Cache-Control: public, max-age=86400, s-maxage=604800, immutable
cache-control: public, max-age=86400, s-maxage=604800, immutable

2 changes: 1 addition & 1 deletion src/routes/(app)/add-ons/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function load({ parent, setHeaders }) {

if (!me) {
setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${VIEWER_MAX_AGE}`,
"cache-control": `public, max-age=${VIEWER_MAX_AGE}`,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/documents/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function load({ url, fetch, data, parent, setHeaders }) {

if (!me) {
setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${VIEWER_MAX_AGE}`,
"cache-control": `public, max-age=${VIEWER_MAX_AGE}`,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/documents/[id]-[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function load({

if (!me) {
setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${VIEWER_MAX_AGE}`,
"cache-control": `public, max-age=${VIEWER_MAX_AGE}`,
"last-modified": new Date(document.updated_at).toUTCString(),
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/projects/[id]-[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function load({ params, url, parent, data, fetch, setHeaders }) {

if (!me) {
setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${VIEWER_MAX_AGE}`,
"cache-control": `public, max-age=${VIEWER_MAX_AGE}`,
"last-modified": new Date(project.data.updated_at).toUTCString(),
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(pages)/about/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function load({ fetch, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${PAGE_MAX_AGE}`,
"cache-control": `public, max-age=${PAGE_MAX_AGE}`,
});

return data;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(pages)/help/[...path]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function load({ fetch, params, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${PAGE_MAX_AGE}`,
"cache-control": `public, max-age=${PAGE_MAX_AGE}`,
});

return data;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(pages)/home/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function load({ fetch, cookies, setHeaders }) {

if (!me) {
setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${PAGE_MAX_AGE}`,
"cache-control": `public, max-age=${PAGE_MAX_AGE}`,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/routes/embed/documents/[id]-[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function load({ fetch, url, params, depends, setHeaders }) {
let settings: Partial<EmbedSettings> = getEmbedSettings(url.searchParams);

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.updated_at).toUTCString(),
});

Expand Down
2 changes: 1 addition & 1 deletion src/routes/embed/documents/[id]-[slug]/preview/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function load({ fetch, url, params, depends, setHeaders }) {
let settings: Partial<EmbedSettings> = getEmbedSettings(url.searchParams);

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.updated_at).toUTCString(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function load({ params, fetch, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.data.updated_at).toUTCString(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function load({ params, fetch, setHeaders, url }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.data.updated_at).toUTCString(),
});

Expand Down
2 changes: 1 addition & 1 deletion src/routes/embed/documents/[id]/pages/[page]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function load({ params, fetch, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.data.updated_at).toUTCString(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function load({ params, fetch, setHeaders, url }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(document.data.updated_at).toUTCString(),
});

Expand Down
2 changes: 1 addition & 1 deletion src/routes/embed/projects/[project_id]-[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function load({ params, fetch, url, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(project.data.updated_at).toUTCString(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function load({ params, fetch, setHeaders }) {
}

setHeaders({
"Cloudflare-CDN-Cache-Control": `public, max-age=${EMBED_MAX_AGE}`,
"cache-control": `public, max-age=${EMBED_MAX_AGE}`,
"last-modified": new Date(project.data.updated_at).toUTCString(),
});

Expand Down
Loading