fix: Upgrade axios to address CVE-2023-45857 (#7713)
[GH Advisory](https://github.com/advisories/GHSA-wf5p-g6vw-rhxx)
This commit is contained in:
committed by
GitHub
parent
8e6b951a76
commit
64eb9bbc36
@@ -251,19 +251,15 @@ export class VaultProvider extends SecretsProvider {
|
||||
this.#http = axios.create({ baseURL: baseURL.toString() });
|
||||
if (this.settings.namespace) {
|
||||
this.#http.interceptors.request.use((config) => {
|
||||
return {
|
||||
...config,
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment
|
||||
headers: { ...config.headers, 'X-Vault-Namespace': this.settings.namespace },
|
||||
};
|
||||
config.headers['X-Vault-Namespace'] = this.settings.namespace;
|
||||
return config;
|
||||
});
|
||||
}
|
||||
this.#http.interceptors.request.use((config) => {
|
||||
if (!this.#currentToken) {
|
||||
return config;
|
||||
if (this.#currentToken) {
|
||||
config.headers['X-Vault-Token'] = this.#currentToken;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment
|
||||
return { ...config, headers: { ...config.headers, 'X-Vault-Token': this.#currentToken } };
|
||||
return config;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user