Fix dev caching issue
This commit is contained in:
parent
9e7fec772d
commit
2d88e42cab
2 changed files with 9 additions and 5 deletions
|
@ -29,10 +29,13 @@ export function setCacheControl(
|
|||
) {
|
||||
const user = UserService.Instance;
|
||||
let caching: string;
|
||||
console.log("In middleware");
|
||||
console.log(process.env.NODE_ENV);
|
||||
|
||||
if (
|
||||
req.path.match(/\.(js|css|txt|manifest\.webmanifest)\/?$/) ||
|
||||
req.path.includes("/css/themelist")
|
||||
process.env.NODE_ENV === "production" &&
|
||||
(req.path.match(/\.(js|css|txt|manifest\.webmanifest)\/?$/) ||
|
||||
req.path.includes("/css/themelist"))
|
||||
) {
|
||||
// Static content gets cached publicly for a day
|
||||
caching = "public, max-age=86400";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue