Auth header missing error while requesting from meilisearch

99 views Asked by At

so i was using meilisearch with nestJs , i hosted it on Azure , but i get auth header missing .

    this._client = new MeiliSearch({
      host: 'myAzureUrl',
      apiKey: 'myApiKey',
    });

[Nest] 2183 - 01/15/2024, 7:31:33 PM ERROR [ExceptionsHandler] The Authorization header is missing. It must use the bearer authorization method. MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method.

if anyone could help me out i would be very thankful

1

There are 1 answers

0
Suksham On

when you are using hosting a meilisearch instance on your cloud , and if you are trying to connect , to the instance , sometimes it gives error as auth header missing , even when auth header is being provided .

This error is only caused when you are not providing the full host address , i.e if you are using host address without https:// , it will throw that error ,so make sure to include it .