aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2021-04-17 20:58:12 +0200
committerivarlovlie <git@ivarlovlie.no>2021-04-17 20:58:12 +0200
commit185bb343a6ebf99bc5c2646a3fa3cf636f937679 (patch)
treef6b25a19fe465b6fafcee10134f8501584117f74
parent39ff1a0d5e22dbfedab9a4286c9cd13a2f25414a (diff)
downloadsrht-git-feed-master.tar.xz
srht-git-feed-master.zip
Add Content-Type to responseHEADmaster
-rw-r--r--index.ts1
1 files changed, 1 insertions, 0 deletions
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 {