fix(GRO-867): proxy logo download through API server — eliminate mixed content #352
@@ -226,9 +226,13 @@ settingsRouter.get("/logo", async (c) => {
|
|||||||
if (!row.logoKey) return c.json({ error: "No logo on file" }, 404);
|
if (!row.logoKey) return c.json({ error: "No logo on file" }, 404);
|
||||||
|
|
||||||
const { body, contentType } = await getObject(row.logoKey);
|
const { body, contentType } = await getObject(row.logoKey);
|
||||||
c.header("Content-Type", contentType);
|
return new Response(Buffer.from(body), {
|
||||||
c.header("Cache-Control", "public, max-age=86400");
|
status: 200,
|
||||||
return c.body(body);
|
headers: {
|
||||||
|
"Content-Type": contentType,
|
||||||
|
"Cache-Control": "public, max-age=86400",
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user