-
Notifications
You must be signed in to change notification settings - Fork 87
fix: ensure internal x-middleware-set-cookie
header is not passed on to lambda
#2891
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -377,6 +377,15 @@ | |
"tests": [ | ||
"router autoscrolling on navigation bugs Should apply scroll when loading.js is used" | ||
] | ||
}, | ||
{ | ||
"file": "test/e2e/app-dir/app-middleware/app-middleware.test.ts", | ||
"reason": "Relies on access to environment variables set on the edge", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is something we can do to actually make it work and possibly this would also handle some other cases that rely on env vars like that: This sets some "PreviewProps" at build time with a bit of random values And this looks like it tries to set them in built middleware Then those env vars seems to be defined in
And the part that we would need to do is to ensure that we set those |
||
"tests": [ | ||
"app-dir with middleware Mutate request headers for Serverless Functions Supports draft mode", | ||
"app-dir with middleware Mutate request headers for Edge Functions Supports draft mode", | ||
"app-dir with middleware Mutate request headers for next/headers Supports draft mode" | ||
] | ||
} | ||
], | ||
"failures": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does final response reaching client (browser/curl etc) would have actual
set-cookie
with this removal? from what I can seemergeMiddlewareCookies
only setscookie
header:opennextjs-netlify/edge-runtime/lib/response.ts
Lines 245 to 248 in 7795157
so I wonder if this change as-is wouldn't result in clients no longer actually receiving
set-cookie
headers?