Hey guys! Is it possible to proxy instantsearch.js requests to the Typesense through some extra backend (acting as a proxy between browser and Typesense)?
We have two groups of users:
1. regular - can access public issues
2. trusted - should be able to access public + private issues
Our threat model is that if the search API key is shared on the frontend (as it currently is), then users who are no longer trusted could still use the known public API key (for private search) to search the collection, even though they should no longer have an access to it.
What we would like to do? Instead of having a public key for a separate collection (
or two keys with embedded `filter_by`
clause to have docs in a single collection), we would like to proxy the requests to the backend first, which can further authorize if user is still a trusted one, and if it can fetch this collection.
I understand from
docs that TypeSense is specifically designed not to go this route, but is something like this possible at all?