Skip to content

Conversation

@JanMisker
Copy link

The api key generated via Algolia::searchKey is too restrictive, it only includes the primary index in its restrictIndices array. When using replicas for sorting with that key it fails, because the replicas are not included. This happens when sending the (secured) search key to a frontend javascript that only has one api key.

This change loads the replicas setting from the associated index config file and appends that to the restrictIndices.

There is probably a better way to load the config, I didn't dive that deep in the code. Perhaps it should be loaded from the remote index instead of via the local synced config file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant