From 185bb343a6ebf99bc5c2646a3fa3cf636f937679 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 17 Apr 2021 20:58:12 +0200 Subject: Add Content-Type to response --- index.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'index.ts') diff --git a/index.ts b/index.ts index ed34551..153976b 100644 --- a/index.ts +++ b/index.ts @@ -86,6 +86,7 @@ for await (const req of serve({ port: parseInt(SERVER_PORT), hostname: SERVER_HO } else if (req.url === "/") { const headers = new Headers(); headers.append("Cache-Control", "public,no-transform,max-age=3600"); + headers.append("Content-Type", "application/json"); headers.append("Expires", new Date(Date.now() + 3600).toUTCString()); req.respond({ body: JSON.stringify(await getRepositories()), headers: headers }); } else { -- cgit v1.3