Method not allowed with this referer

Recently ive started getting an error when i start up my localhost version of the site but cant figure out whats causing it. The searchkey is valid as well.
the error is:
Unhandled Rejection (AlgoliaSearchError): Method not allowed with this referer

Hi @nritsonsa, are you using custom API keys with a Referer constraint?

@ntrisonsa most likely was using the Referrer Constraint.

@alexandre.meunier How do you give a referrer restraint while also still allowing localhost access for local development?

Hi @mattucci

I would suggest creating using two API keys: one used in production with a referer constraint, and one used in development (without or without referer constraint).