mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-06 21:57:57 +02:00
fix: remove cache from repository API
This commit is contained in:
@@ -48,7 +48,6 @@ router.get(
|
|||||||
const repo = await getRepo(req, res);
|
const repo = await getRepo(req, res);
|
||||||
if (!repo) return;
|
if (!repo) return;
|
||||||
try {
|
try {
|
||||||
// ache the file for 6 hours
|
|
||||||
res.header("Cache-Control", "no-cache");
|
res.header("Cache-Control", "no-cache");
|
||||||
|
|
||||||
res.json(await repo.anonymizedFiles({ includeSha: false }));
|
res.json(await repo.anonymizedFiles({ includeSha: false }));
|
||||||
@@ -122,7 +121,8 @@ router.get(
|
|||||||
!!config.ENABLE_DOWNLOAD &&
|
!!config.ENABLE_DOWNLOAD &&
|
||||||
repo.source.type == "GitHubDownload";
|
repo.source.type == "GitHubDownload";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.header("Cache-Control", "no-cache");
|
||||||
res.json({
|
res.json({
|
||||||
url: redirectURL,
|
url: redirectURL,
|
||||||
download,
|
download,
|
||||||
|
|||||||
Reference in New Issue
Block a user