Open jyxia opened 3 years ago
You can use setHeaders
method on appbase instance.
@bietkul Hey thanks, I saw that method. But we're using initReactivesearch
in ReactiveSearch to initialize the initial state on SSR, do we have the access to the AppBase instance in there? see here: https://github.com/appbaseio/reactivesearch/blob/99dfb90083710ea6d96a4ca9e94280a88bc5a599/packages/web/src/server/index.js#L91
initReactivesearch
instantiate AppBase with the headers
passed in from settings
and didn't use setHeaders
. Should I file an issue in ReactiveSearch then?
@bietkul can you please provide some input? I know this issue was closed, but it would be helpful if you can kindly reply. Thanks.
@jyxia Please file an issue on ReactiveSearch instead. It is not an issue with appbase-js
.
can i work on this @bietkul
In our app, we are passing customized headers to
initReactivesearch
and not seeing the customized headers being passed to the actual request. I think the reason is that theheaders
always got set to an empty object{}
in this line https://github.com/appbaseio/appbase-js/blob/develop/src/core/index.js#L58.Shouldn't this line be
this.headers = config.headers || {}
? otherwise any AppBase instance would always have an empty object inheaders
.