mirror of
https://github.com/gethomepage/homepage.git
synced 2025-07-09 03:04:18 -04:00
fix request
This commit is contained in:
parent
da823ad7e8
commit
8f25bf5427
@ -123,10 +123,10 @@ export async function httpProxy(url, params = {}) {
|
|||||||
? new https.Agent({ ...agentOptions, rejectUnauthorized: false })
|
? new https.Agent({ ...agentOptions, rejectUnauthorized: false })
|
||||||
: new http.Agent(agentOptions);
|
: new http.Agent(agentOptions);
|
||||||
}
|
}
|
||||||
const request = httpsRequest(constructedUrl, {
|
const request =
|
||||||
agent,
|
constructedUrl.protocol === "https:"
|
||||||
...params,
|
? httpsRequest(constructedUrl, { agent, ...params })
|
||||||
});
|
: httpRequest(constructedUrl, { agent, ...params });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [status, contentType, data, responseHeaders] = await request;
|
const [status, contentType, data, responseHeaders] = await request;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user