mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
fix portainer offline containers count
This commit is contained in:
@@ -26,10 +26,7 @@ export default async function handler(req, res) {
|
||||
rejectUnauthorized: false,
|
||||
});
|
||||
|
||||
const [status, data] = await httpsRequest({
|
||||
hostname: url.hostname,
|
||||
path: url.pathname,
|
||||
port: url.port,
|
||||
const [status, contentType, data] = await httpsRequest(url, {
|
||||
agent: httpsAgent,
|
||||
method: req.method,
|
||||
headers: headers,
|
||||
@@ -41,12 +38,10 @@ export default async function handler(req, res) {
|
||||
}),
|
||||
});
|
||||
|
||||
res.setHeader("Content-Type", contentType);
|
||||
return res.status(status).send(data);
|
||||
} else {
|
||||
const [status, data] = await httpRequest({
|
||||
hostname: url.hostname,
|
||||
path: url.pathname,
|
||||
port: url.port,
|
||||
const [status, contentType, data] = await httpRequest(url, {
|
||||
method: req.method,
|
||||
headers: headers,
|
||||
body:
|
||||
@@ -57,6 +52,7 @@ export default async function handler(req, res) {
|
||||
}),
|
||||
});
|
||||
|
||||
res.setHeader("Content-Type", contentType);
|
||||
return res.status(status).send(data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user