This commit is contained in:
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user