feat(api): expose protocol and host on lambda fastify requests#1654
feat(api): expose protocol and host on lambda fastify requests#1654Tobbe merged 2 commits intocedarjs:mainfrom
Conversation
👷 Deploy request for cedarjs pending review.Visit the deploys page to approve it
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build:pack --exclude create-ceda... |
✅ Succeeded | 6s | View ↗ |
nx run-many -t build |
✅ Succeeded | 4s | View ↗ |
nx run-many -t test --minWorkers=1 --maxWorkers=4 |
✅ Succeeded | 1m 18s | View ↗ |
nx run-many -t test:types |
✅ Succeeded | 7s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-04-22 15:02:16 UTC
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build |
✅ Succeeded | 14s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-04-21 21:28:31 UTC
|
Thanks for the PR Matt. Since you're touching this area of the code I also wanted to make you aware of this: #1616 |
Oh sweet, this might not be necessary then if you're moving to a standardized approach. We can probably work around it for now, feel free to close |
It's such a small change I'll merge it as soon as CI passes. Also gives me a good reason to get a new release of Cedar out :) |
Greptile SummaryThis PR updates Confidence Score: 5/5Safe to merge — the change is well-scoped, properly tested, and resolves the prior review feedback. No P0 or P1 findings. The spread order correctly lets existing upstream headers override the x-forwarded-proto default, which is verified by the new tests. The domainName mapping is a straightforward addition with no correctness concerns. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix: use x-forwarded-proto, respecting h..." | Re-trigger Greptile |
e98e3ae to
06277e9
Compare
|
@greptileai re-review the PR |

We have a use case where we need to re-construct a url in our lambda handler based on the event.
In a typical lambda handler, these properties are expected to be there, but cedar appears to not be mapping all required properties from the fastify request. We just need these ones, but worth considering if we should be trying to map more. This is the expected type from aws lambda: