1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Inject CA asap

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2021-11-02 16:40:07 +02:00
parent 61967cb8ed
commit aa7645347f
No known key found for this signature in database
GPG Key ID: 54B44603D251B788
2 changed files with 6 additions and 5 deletions

View File

@ -66,13 +66,15 @@ import { initTray } from "./tray";
import { kubeApiRequest, shellApiRequest } from "./proxy-functions";
import { AppPaths } from "../common/app-paths";
injectSystemCAs();
const onCloseCleanup = disposer();
const onQuitCleanup = disposer();
SentryInit();
app.setName(appName);
logger.info(`📟 Setting ${productName} as protocol client for lens://`);
if (app.setAsDefaultProtocolClient("lens")) {
@ -120,9 +122,7 @@ app.on("second-instance", (event, argv) => {
WindowManager.getInstance(false)?.ensureMainWindow();
});
app.on("ready", async () => {
await injectSystemCAs();
app.on("ready", async () => {
logger.info(`🚀 Starting ${productName} from "${AppPaths.get("exe")}"`);
logger.info("🐚 Syncing shell environment");
await shellSync();

View File

@ -39,10 +39,11 @@ import { catalogEntityRegistry } from "./api/catalog-entity-registry";
import logger from "../common/logger";
import { unmountComponentAtNode } from "react-dom";
injectSystemCAs();
@observer
export class LensApp extends React.Component {
static async init(rootElem: HTMLElement) {
await injectSystemCAs();
catalogEntityRegistry.init();
ExtensionLoader.getInstance().loadOnClusterManagerRenderer();
LensProtocolRouterRenderer.createInstance().init();