NextJS SSR SearchState filters not working

Hello guys,
I am using NextJs and React InstantSearch v6.
Currently when accessing category pages, the attribute filters is passed to the Configure element e.g. filters=“categories: category1”, these filters are not shown in the facets or searchbox as a query, which is exactly what I want. For the search on the server I want to do the same. In the getInitialProps function, I cannot pass an attribute filters to the SearchState. I have already tried to add filters to the attribute configure but the search is not limited to the category. Is it somehow possible to give the search the same filters of the configure element so that the initial search on the SSR can be restricted by categories too?