Elastic Endpoints without `https://` doesn't work
madguy02 opened this issue · 2 comments
madguy02 commented
Here is a sample code that throws error without adding https://
at the beginning of the URL,
let esp = new es.Client({
nodes: ['my-elastic-cluster.us-east-1.amazon.aws.com']
})
This above piece of code throws:
throw new ERR_INVALID_URL(input);
^
TypeError [ERR_INVALID_URL]: Invalid URL:my-elastic-cluster.us-east-1.amazon.aws.com
Is there a way we can hit the endpoint without using https:// at the beginning of a url?
avin-kavish commented
What is stopping you from specifying the protocol in front of the URL?
madguy02 commented
@avin-kavish this is resolved, but i wonder what exactly changed that we specifically need to specify https
(otherwise it detects the URL to be invalid), earlier with elasticsearchJS this wasn't the case.
Its not exactly stopping from anything, but had to change a lot of configurations in serverless templates, hence wanted to ask this.