Closed lakhansamani closed 5 years ago
I think this is an expected behavior. We can implement this enhancement if you have a use-case to support it.
Since we are using appbase-js
in ReactiveSearch, if someone passes headers
props with Authorization
instead of credentials then it could fail and crash the whole app.
It will only crash in case of scalr.api.appbase.io
. In such cases, you should use credentials
prop. Do you have a usecase where you can't use credentials
prop with scalr api url as the url
prop in ReactiveBase
?
@metagrover That's a good point. One use-case is users who want to use Basic Auth headers instead to authenticate. Overall, I think we should leave it mandatory for scalr.api.appbase.io
host, but not for a generic ES cluster. If this is already the case, we can close this issue.
Yep, that's the current state of things.
If it is Appbase app and credentials are passed as
Authorization
header instead of credentials in the config, then it doesn't allow the user to connect.An error is thrown from the following line https://github.com/appbaseio/appbase-js/blob/develop/src/core/index.js#L51