mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
12 lines
341 B
TypeScript
12 lines
341 B
TypeScript
import request from "request"
|
|
import { userStore } from "./user-store"
|
|
|
|
export function globalRequestOpts(requestOpts: request.Options) {
|
|
const { httpsProxy, allowUntrustedCAs } = userStore.preferences
|
|
if (httpsProxy) {
|
|
requestOpts.proxy = httpsProxy
|
|
}
|
|
requestOpts.rejectUnauthorized = !allowUntrustedCAs;
|
|
return requestOpts
|
|
}
|