mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
don't override getRequestOptions if they are set
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
b66592612a
commit
b3a8ad362d
@ -23,15 +23,17 @@ const createJsonApiInjectable = getInjectable({
|
|||||||
const lensProxyCert = di.inject(lensProxyCertificateInjectionToken);
|
const lensProxyCert = di.inject(lensProxyCertificateInjectionToken);
|
||||||
|
|
||||||
return (config, reqInit) => {
|
return (config, reqInit) => {
|
||||||
config.getRequestOptions = async () => {
|
if (!config.getRequestOptions) {
|
||||||
const agent = new Agent({
|
config.getRequestOptions = async () => {
|
||||||
ca: lensProxyCert.get().cert,
|
const agent = new Agent({
|
||||||
});
|
ca: lensProxyCert.get().cert,
|
||||||
|
});
|
||||||
return {
|
|
||||||
agent,
|
return {
|
||||||
|
agent,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
return new JsonApi(deps, config, reqInit);
|
return new JsonApi(deps, config, reqInit);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user