app-search-javascript
app-search-javascript copied to clipboard
Allow for full url specification
There are cases in which app search is being an API gateway or reverse proxy that benefits from allowing the consumer of the app-search client to specify what the end point should be.
This recently came up on a search-ui implementation where just the production environment was going to be behind a API gateway. This would require implementing a custom handler/middleware in search-ui which would be better to simply have the string concatenation for the endpoint overwritten or specified by the consumer of the SDK.
https://github.com/elastic/app-search-javascript/blob/master/src/client.js#L50