This commit is contained in:
@ -23,6 +23,11 @@ export default function views(g: ABC.Application) {
|
||||
packages = await db.package.find({});
|
||||
}
|
||||
|
||||
ctx.render("index", {
|
||||
packages,
|
||||
search,
|
||||
});
|
||||
|
||||
const etag =
|
||||
"W/" +
|
||||
Hash.createHash("sha3-256")
|
||||
@ -36,12 +41,8 @@ export default function views(g: ABC.Application) {
|
||||
)
|
||||
.toString("base64");
|
||||
|
||||
ctx.response.headers.set("e-tag", etag);
|
||||
|
||||
return ctx.render("index", {
|
||||
packages,
|
||||
search,
|
||||
});
|
||||
ctx.response.headers.set("cache-control", CACHE_CONTROL);
|
||||
ctx.response.headers.set("E-Tag", etag);
|
||||
});
|
||||
g.get("/package/:package", async (ctx) => {
|
||||
let [packageName, packageVersion] = extractPackagePath(
|
||||
|
Reference in New Issue
Block a user