mirror of
https://github.com/expo/node-vault.git
synced 2026-11-27 16:45:28 -10:00
22 lines
455 B
JavaScript
22 lines
455 B
JavaScript
// file: example/pass_request_options.js
|
|
|
|
process.env.DEBUG = 'node-vault'; // switch on debug mode
|
|
|
|
const vault = require('./../src/index')();
|
|
|
|
const options = {
|
|
headers: {
|
|
'X-HELLO': 'world',
|
|
},
|
|
agentOptions: {
|
|
cert: 'mycert',
|
|
key: 'mykey',
|
|
passphrase: 'password',
|
|
securityOptions: 'SSL_OP_NO_SSLv3',
|
|
},
|
|
};
|
|
|
|
vault.help('sys/policy', options)
|
|
.then(() => vault.help('sys/mounts'))
|
|
.catch((err) => console.error(err.message));
|