Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(server): Cache-Controlヘッダを付与 #42

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(unreleased)
------------------
* センシティブフラグの判定を `<meta property="rating">` および `rating` ヘッダでも行うように
* 内蔵サーバー:レスポンスに`Cache-Control`ヘッダを含むように
* Bluesky(bsky.app)のプレビューに対応
* `fediverse:creator` のパースに対応
* 依存関係の更新
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
},
})
.then(res => res.url);
} catch (e) {

Check warning on line 107 in src/index.ts

View workflow job for this annotation

GitHub Actions / lint (20.10.0)

'e' is defined but never used
actualUrl = url;
}
}
Expand Down Expand Up @@ -152,6 +152,8 @@
});
}

reply.header('Cache-Control', 'public, max-age=86400, stale-while-revalidate=43200, immutable');

try {
const summary = await summaly(url, {
lang: req.query.lang as string,
Expand Down
Loading