Please enhance readme w/ authN example
Closed this issue · 1 comments
pulkitsinghal commented
Although it only took 5 mins to find:
if (this.auth) {
request.setHeader("Authorization", "Basic " + new Buffer(this.auth.username + ":" + this.auth.password).toString('base64'))
}
It would still be nice to have a sample of how to specify username / password in this client on the README for quicker reference :)
var serverOptions = {
host: process.env.ES_HOST,
port: process.env.ES_PORT,
secure: process.env.ES_SECURE,
auth: {
username: process.env.ES_USERNAME,
password: process.env.ES_PASSWORD
}
};
phillro commented
done