Closed focusaurus closed 2 years ago
I guess we can remove host+domain validations for non-appbase url(s). What do you think @siddharthlatest @bietkul?
I am also facing this exact same issue when I turned on proxy in package.json. @metagrover @bietkul
@focusaurus were you able to resolve this somehow?
I had exact same issue when using proxy via package.json. This is a silly workaround but works for me, hopefully it'll help you guys out:
// reactive search won't allow relative url, so re-construct:
const port = window.location.port ? `:${window.location.port}` : '';
const url = `${window.location.protocol}//${window.location.hostname}${port}/api`;
return (
<SearchContent className={searchStyle}>
<ReactiveBase
app="datasets"
url={url}
headers={
{'x-csrf-token': getToken()}
}
>
What about the state of this? Just ran into the same CORS problem which could only be solved via a vue server proxy configuration if SearchBase.url would accept a relative uri like "/endpoint".
I would like to configure an elasticsearch URL of just "/elasticsearch" and allow my server to reverse proxy the HTTP traffic to elasticsearch. Currently the configuration validation code requires the configured URL to include the protocol. This creates a configuration and CORS problem I would like to avoid in the browser by just talking to my main app server and proxying from there. I have so far not found a way to do this due to this validation.