Laravel Scout: Add replica indices to the secured api search key

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.

I made a pull request to add the replicas to the secured api key.

1 Like

@jan2 welcome to the community! Super awesome of you to submit a PR!