Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise API Header to Accept Both x-apikey and X-API-KEY #7737

Open
TahaAburakhis opened this issue Nov 7, 2024 · 0 comments
Open

Standardise API Header to Accept Both x-apikey and X-API-KEY #7737

TahaAburakhis opened this issue Nov 7, 2024 · 0 comments

Comments

@TahaAburakhis
Copy link

Description
The Voyager API only accepts the x-apikey header for authentication, which deviates from the common industry standard X-API-KEY header. This inconsistency can lead to confusion and debugging challenges for developers who are accustomed to using the standard format.

Steps to Reproduce
To replicate the issue:

  1. Make an API request to Voyager using X-API-KEY as the header for the API key.
  2. Observe the response received from the server.

Actual behaviour
When using X-API-KEY as the header, the API responds with an authentication error, indicating that the API key is missing or invalid. This happens because the API only recognizes x-apikey, which is not standard practice.

Expected behaviour
The API should accept both x-apikey and X-API-KEY headers, treating them in a case-insensitive manner. This would align with common practices and enhance the developer experience by reducing confusion and potential errors.

Additional context
This issue impacts the usability of the Voyager API for developers who are used to the common X-API-KEY header format. Implementing a simple change in the header authentication logic to accept both headers would greatly improve the developer experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant