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 http.Agent(agentOptions);
|
||||
}
|
||||
const request = httpsRequest(constructedUrl, {
|
||||
agent,
|
||||
...params,
|
||||
});
|
||||
const request =
|
||||
constructedUrl.protocol === "https:"
|
||||
? httpsRequest(constructedUrl, { agent, ...params })
|
||||
: httpRequest(constructedUrl, { agent, ...params });
|
||||
|
||||
try {
|
||||
const [status, contentType, data, responseHeaders] = await request;
|
||||
|
Loading…
x
Reference in New Issue
Block a user