mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
fix: ensure caching in file explorers
This commit is contained in:
@@ -73,8 +73,6 @@ export const repositoriesController = new Hono()
|
||||
};
|
||||
});
|
||||
|
||||
// c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
|
||||
|
||||
return c.json<ListSnapshotsDto>(snapshots, 200);
|
||||
})
|
||||
.get("/:name/snapshots/:snapshotId", getSnapshotDetailsDto, async (c) => {
|
||||
@@ -108,7 +106,7 @@ export const repositoriesController = new Hono()
|
||||
|
||||
const result = await repositoriesService.listSnapshotFiles(name, snapshotId, path);
|
||||
|
||||
// c.header("Cache-Control", "max-age=300, stale-while-revalidate=600");
|
||||
c.header("Cache-Control", "max-age=300, stale-while-revalidate=600");
|
||||
|
||||
return c.json<ListSnapshotFilesDto>(result, 200);
|
||||
},
|
||||
|
||||
@@ -120,7 +120,7 @@ export const volumeController = new Hono()
|
||||
path: result.path,
|
||||
};
|
||||
|
||||
// c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
|
||||
c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
|
||||
|
||||
return c.json<ListFilesDto>(response, 200);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user