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

feat: LEAP-818: Add X-Api-Key support #5562

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Conversation

jombooth
Copy link
Contributor

@jombooth jombooth commented Mar 11, 2024

If X-API-Key header is specified with <token>, overwrite the Authorization header with Token <token>.

Resolves #3349

~/Repos/label-studio on  fb-LEAP-818/x-api-key [$?]
❯ curl -X GET http://localhost:8080/api/projects/ -H 'X-API-Key: [redacted]'
{"count":27,"next":null,"previous":null,"results":[...]}

HttpRequest.META documentation for reference: https://docs.djangoproject.com/en/5.0/ref/request-response/#django.http.HttpRequest.META

@github-actions github-actions bot added the feat label Mar 11, 2024
Copy link

netlify bot commented Mar 11, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 54214d4
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/65ef7a368d39e00008c83433

Copy link

netlify bot commented Mar 11, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 54214d4
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/65ef7a36c2028b0008e0bba4

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.79%. Comparing base (40e174b) to head (54214d4).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5562      +/-   ##
===========================================
+ Coverage    75.77%   75.79%   +0.01%     
===========================================
  Files          157      157              
  Lines        13125    13133       +8     
===========================================
+ Hits          9946     9954       +8     
  Misses        3179     3179              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niklub niklub self-requested a review March 11, 2024 22:04
@jombooth jombooth merged commit 537d30d into develop Mar 11, 2024
38 checks passed
@jombooth jombooth deleted the fb-LEAP-818/x-api-key branch March 11, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authorization Token collision with Google IAP (Identity-Aware Proxy)
2 participants