-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Description
Even though i set sendApiKeyAsQueryParam to false when i create a new TypesenseInstantSearchAdapterOptions react-instantsearch still sends queries with X-TYPESENSE-API-KEY http header.
How do i override react-instantsearch and make it post the api key under the payload body instead? I have a very long api key (> 2000 characters), and it's not going through some api gate ways as their request header limit is small.
Steps to reproduce
const generateTypesenseInstantsearchAdapterOptions = (): TypesenseInstantsearchAdapterOptions => {
// Search settings for full search
return {
server: {
apiKey: '',
nodes: [
{
host: ApiSettings.HOST,
port: ApiSettings.PORT,
protocol: ApiSettings.PROTOCOL,
},
],
sendApiKeyAsQueryParam: false,
},
};
};
const typesenseInstantSearchAdapter = new TypesenseInstantsearchAdapter(typesenseOptions);
const searchClient = typesenseInstantSearchAdapter.searchClient;
<InstantSearch
searchClient={searchClient}
indexName={INDEX_NAME}
onStateChange={onStateChange}
initialUiState={getInitialUiState()}
>
</InstantSearch>
Expected Behavior
I expect react-instant search not to send X-TYPESENSE-API-KEY when a query is sent
Actual Behavior
react-instant search still sends api key with the header
Typesense Version: 0.23.1
OS: Ubuntu
Metadata
Metadata
Assignees
Labels
No labels