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);
|
||||
|
||||
return (config, reqInit) => {
|
||||
config.getRequestOptions = async () => {
|
||||
const agent = new Agent({
|
||||
ca: lensProxyCert.get().cert,
|
||||
});
|
||||
|
||||
return {
|
||||
agent,
|
||||
if (!config.getRequestOptions) {
|
||||
config.getRequestOptions = async () => {
|
||||
const agent = new Agent({
|
||||
ca: lensProxyCert.get().cert,
|
||||
});
|
||||
|
||||
return {
|
||||
agent,
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
return new JsonApi(deps, config, reqInit);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user