-
Notifications
You must be signed in to change notification settings - Fork 403
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
[Service Utils] Feature: Accept Request in authorizeNode
#5724
[Service Utils] Feature: Accept Request in authorizeNode
#5724
Conversation
🦋 Changeset detectedLatest commit: 90a16da The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5724 +/- ##
=======================================
Coverage 52.85% 52.85%
=======================================
Files 1098 1098
Lines 58976 58976
Branches 4788 4788
=======================================
Hits 31173 31173
Misses 27087 27087
Partials 716 716
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
Merge activity
|
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `authorizeNode` function by improving type handling for request headers and refactoring how headers are accessed. It introduces a type guard for distinguishing between header types and updates the way headers are retrieved in various functions. ### Detailed summary - Updated `req` type in `AuthInput` to allow `Request`. - Added `isNodeHeaders` function to differentiate between `IncomingHttpHeaders` and `Headers`. - Refactored `getHeader` function to use `isNodeHeaders` for retrieving headers. - Modified `extractAuthorizationData` to use `getHeader` for constructing the URL. - Updated `logHttpRequest` to use `getHeader` for SDK-related headers. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
7ad7c7e
to
90a16da
Compare
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on enhancing the
authorizeNode
function in theservice-utils
package by improving type handling for request headers and refactoring header retrieval logic.Detailed summary
req
type inAuthInput
to allowRequest
.isNodeHeaders
type guard to distinguish betweenIncomingHttpHeaders
andHeaders
.getHeader
function to utilizeisNodeHeaders
.extractAuthorizationData
to usegetHeader
for host retrieval.logHttpRequest
to usegetHeader
for various header fields.