-
Notifications
You must be signed in to change notification settings - Fork 621
Only set secret key or client ID when not using auth token #6994
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
Only set secret key or client ID when not using auth token #6994
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6994 +/- ##
==========================================
- Coverage 54.60% 54.59% -0.01%
==========================================
Files 903 903
Lines 57934 57935 +1
Branches 3968 3970 +2
==========================================
- Hits 31636 31632 -4
- Misses 26198 26202 +4
- Partials 100 101 +1
🚀 New features to boost your workflow:
|
Merge activity
|
This PR modifies the header setting logic in `getClientFetch` to ensure that secret keys and client IDs are only set when not using an auth token. This prevents potential conflicts between different authentication methods by making the header setting logic mutually exclusive.
b1e96c0 to
e8b2580
Compare
This PR modifies the header setting logic in `getClientFetch` to ensure that secret keys and client IDs are only set when not using an auth token. This prevents potential conflicts between different authentication methods by making the header setting logic mutually exclusive.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR modifies the logic in the `fetch.ts` file to ensure that the `x-secret-key` and `x-client-id` headers are only set when not using the authentication token, enhancing security and clarity in header management.
### Detailed summary
- Added an `else` clause to only set `x-secret-key` if not using the auth token.
- Rearranged the condition for setting `x-client-id` to follow the new logic.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
05fd329 to
e739de1
Compare

This PR modifies the header setting logic in
getClientFetchto ensure that secret keys and client IDs are only set when not using an auth token. This prevents potential conflicts between different authentication methods by making the header setting logic mutually exclusive.PR-Codex overview
This PR modifies the logic for setting HTTP headers in the
fetch.tsfile. It ensures that thex-secret-keyandx-client-idheaders are only set when an authentication token is not being used, improving the conditional handling of these headers.Detailed summary
x-secret-keyto only occur if an authentication token is not used.if (clientId)condition to maintain clarity in header setting.