Skip to content

Commit

Permalink
Fix secret loading in top level API
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Dec 16, 2024
1 parent 02ef29f commit 765c3d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/src/handlers/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Honeybadger = require("../honeybadger-setup");
const { StatusCodes } = require("http-status-codes");
const { SECRETS_PATH } = process.env;
const SecretPaths = [
`${SECRETS_PATH}/config/dcapi`,
`${SECRETS_PATH}/infrastructure/index`,
`${SECRETS_PATH}/infrastructure/nusso`,
];
Expand Down Expand Up @@ -64,6 +65,7 @@ const _initializeEnvironment = async function () {
endpoint = new URL(endpoint).hostname;
}

putenv("API_TOKEN_SECRET", secrets.dcapi?.api_token_secret);
putenv("OPENSEARCH_ENDPOINT", endpoint);
putenv("OPENSEARCH_MODEL_ID", secrets.index?.embedding_model);
putenv("NUSSO_API_KEY", secrets.nusso?.api_key);
Expand Down
1 change: 1 addition & 0 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ Resources:
Properties:
Location: ./chat/template.yaml
Parameters:
ApiTokenName: !Ref ApiTokenName
EnvironmentPrefix: !Ref EnvironmentPrefix
HoneybadgerApiKey: !Ref HoneybadgerApiKey
HoneybadgerEnv: !Ref HoneybadgerEnv
Expand Down

0 comments on commit 765c3d5

Please sign in to comment.