-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initialize ALS with cookies in middleware
- Loading branch information
Showing
7 changed files
with
118 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
test/e2e/app-dir/app-middleware/app/rsc-cookies-delete/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { cookies } from 'next/headers' | ||
|
||
export default function Page() { | ||
const rscCookie1 = cookies().get('rsc-cookie-value-1')?.value | ||
const rscCookie2 = cookies().get('rsc-cookie-value-2')?.value | ||
|
||
return ( | ||
<div> | ||
<p id="rsc-cookie-1">Cookie 1: {rscCookie1}</p> | ||
<p id="rsc-cookie-2">Cookie 2: {rscCookie2}</p> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { cookies } from 'next/headers' | ||
import Link from 'next/link' | ||
|
||
export default function Page() { | ||
const rscCookie1 = cookies().get('rsc-cookie-value-1')?.value | ||
const rscCookie2 = cookies().get('rsc-cookie-value-2')?.value | ||
|
||
return ( | ||
<div> | ||
<p id="rsc-cookie-1">Cookie 1: {rscCookie1}</p> | ||
<p id="rsc-cookie-2">Cookie 2: {rscCookie2}</p> | ||
<Link href="/rsc-cookies-delete">To Delete Cookies Route</Link> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters