feat: trying to add hashes to scripts

This commit is contained in:
Max Richter
2026-01-10 13:03:13 +01:00
parent e65938ecc2
commit e55f787a29
79 changed files with 4209 additions and 720 deletions

View File

@@ -1,6 +1,6 @@
import { FreshContext, Handlers } from "$fresh/server.ts";
import { getImageContent } from "@lib/image.ts";
import { createLogger } from "@lib/log/index.ts";
import { Context } from "fresh";
const log = createLogger("api/image");
@@ -69,9 +69,9 @@ async function generateETag(content: Uint8Array<ArrayBuffer>): Promise<string> {
}"`;
}
async function GET(req: Request, _ctx: FreshContext): Promise<Response> {
async function GET(ctx: Context<unknown>): Promise<Response> {
try {
const url = new URL(req.url);
const url = new URL(ctx.req.url);
const params = parseParams(url);
if (typeof params === "string") {
@@ -106,6 +106,6 @@ async function GET(req: Request, _ctx: FreshContext): Promise<Response> {
}
}
export const handler: Handlers = {
export const handler = {
GET,
};