fuck you
All checks were successful
Publish Docker Images / docker (push) Successful in 1m20s

This commit is contained in:
Lee 2023-11-16 19:16:12 +00:00
parent 074f025c44
commit f989feb78b

@ -1,3 +1,4 @@
import { GetOptions } from "infisical-node/lib/types/InfisicalClient";
import { createInfisicalClient } from "utils"; import { createInfisicalClient } from "utils";
export let PROXY_SECRET: string; export let PROXY_SECRET: string;
@ -9,7 +10,13 @@ export async function initSecrets(token: string) {
console.log("Initializing secrets..."); console.log("Initializing secrets...");
const infisicalClient = createInfisicalClient(token); const infisicalClient = createInfisicalClient(token);
const proxySecret = (await infisicalClient.getSecret("PROXY_SECRET")) const options: GetOptions = {
environment: process.env.NODE_ENV === "production" ? "main" : "dev",
path: "/",
type: "shared",
};
const proxySecret = (await infisicalClient.getSecret("PROXY_SECRET", options))
.secretValue; .secretValue;
if (!proxySecret) { if (!proxySecret) {