## Summary Hashicorp Vault prefers a `LIST` HTTP method to be used when fetching secrets but not all environments will allow custom http methods through WAFs. This PR adds `N8N_EXTERNAL_SECRETS_PREFER_GET` which when set to `true` will use GET instead of LIST to fetch secrets. ## Review / Merge checklist - [x] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
12 lines
405 B
TypeScript
12 lines
405 B
TypeScript
import { License } from '@/License';
|
|
import config from '@/config';
|
|
import Container from 'typedi';
|
|
|
|
export const updateIntervalTime = () => config.getEnv('externalSecrets.updateInterval') * 1000;
|
|
export const preferGet = () => config.getEnv('externalSecrets.preferGet');
|
|
|
|
export function isExternalSecretsEnabled() {
|
|
const license = Container.get(License);
|
|
return license.isExternalSecretsEnabled();
|
|
}
|