mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 06:38:46 +00:00
check that content type exists before setting it
This commit is contained in:
parent
bad436b858
commit
08afa0b747
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ export default async function genericProxyHandler(req, res) {
|
|||
const url = new URL(formatApiCall(widget.type, { endpoint, ...widget }));
|
||||
const [status, contentType, data] = await httpProxy(url);
|
||||
|
||||
res.setHeader("Content-Type", contentType);
|
||||
if (contentType) res.setHeader("Content-Type", contentType);
|
||||
return res.status(status).send(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue