vue-storefront-api
vue-storefront-api copied to clipboard
Catalog endpoint ignores ElasticSearch host protocol
The default configuration file has detailed fields for each ElasticSearch connection, including a protocol field to specify the connection protocol (i.e. HTTP/HTTPS).
https://github.com/DivanteLtd/vue-storefront-api/blob/32029f79360d1b74398ac35f46e70a29d6beef7b/config/default.json#L16
However, the catalog endpoint still assumes that the protocol definition is mentioned in the host field, and therefore a config such as the one below gets sent over HTTP instead.
"elasticsearch": {
"host": "your.host.com",
"port": 443,
"protocol": "https",
...
This is due to: https://github.com/DivanteLtd/vue-storefront-api/blob/32029f79360d1b74398ac35f46e70a29d6beef7b/src/api/catalog.js#L68
A good fix would be to add the protocol to the beginning of the URL such as in https://github.com/DivanteLtd/vue-storefront-api/blob/32029f79360d1b74398ac35f46e70a29d6beef7b/scripts/mage2vs.js#L45