Disable cache-control in dev mode
This commit is contained in:
parent
f6e791a7ac
commit
465e0612ff
|
@ -13,6 +13,7 @@ DATA_CACHING=false
|
|||
DATA_PRECACHING=false
|
||||
PAGE_CACHING=false
|
||||
PAGE_PRECACHING=false
|
||||
CACHE_CONTROL=false
|
||||
|
||||
## OPEN EXCHANGE RATE
|
||||
OER_APP_ID=oerappid5e6ea45ef4e66eaa151612bdcb599df
|
||||
|
|
3
TODO.md
3
TODO.md
|
@ -2,8 +2,7 @@
|
|||
|
||||
## Ongoing
|
||||
|
||||
- [Bugs] No post processing on the 404 page
|
||||
|
||||
- [Bugs] It's possible to save a page with empty Line or Cue
|
||||
- [Bugs] Keziah reported some lag spikes when scrolling on the home page (Firefox on Windows)
|
||||
- [Feat] [Analytics] Add analytics
|
||||
- [Bugs] [Tooltips] Tooltip in under next element (example in timeline)
|
||||
|
|
|
@ -12,7 +12,12 @@ export const addCommonHeadersMiddleware = defineMiddleware(async ({ url }, next)
|
|||
// TODO: Remove when in production
|
||||
response.headers.set("X-Robots-Tag", "none");
|
||||
response.headers.set("Vary", "Cookie");
|
||||
response.headers.set("Cache-Control", "max-age=86400, stale-while-revalidate=86400");
|
||||
|
||||
if (import.meta.env.CACHE_CONTROL !== "true") {
|
||||
response.headers.set("Cache-Control", "no-store");
|
||||
} else {
|
||||
response.headers.set("Cache-Control", "max-age=86400, stale-while-revalidate=86400");
|
||||
}
|
||||
|
||||
return response;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue