Skip to content

Commit

Permalink
fix: use more accurate cache-control directive
Browse files Browse the repository at this point in the history
* fix: use more accurate cache-control directive
  • Loading branch information
lee88688 authored Jan 17, 2024
1 parent bb6a7d7 commit 1afca01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/pages/reader/epubReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MarkType } from "y/utils/constants";
import { EpubReader } from "y/utils/epubReader";
import { useMutation } from "@tanstack/react-query";
import { useTheme } from "@mui/material/styles";
import { useMemoizedFn, useLatest, usePrevious } from "ahooks";
import { useMemoizedFn, usePrevious } from "ahooks";
import useVirtualKeyboard from "y/hooks/useVirtualKeyboard";

// window.EpubCFI = EpubCFI;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/book/file/[fileName]/[...path].ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const handler: NextApiHandler = async (req, res) => {
if (contentType) {
res.appendHeader("Content-Type", contentType);
}
res.appendHeader("Cache-Control", "max-age=60");
res.appendHeader("Cache-Control", "private,max-age=31536000,immutable");
res.send(file);
};

Expand Down

0 comments on commit 1afca01

Please sign in to comment.