Buckets:
| import { headers } from 'next/headers' | |
| import { getSentinelValue } from '../../getSentinelValue' | |
| import { AllComponents } from './components' | |
| export default async function Page() { | |
| const allHeaders = await headers() | |
| const xSentinelValues = new Set<string>() | |
| for (let [headerName, headerValue] of allHeaders.entries()) { | |
| if (headerName.startsWith('x-sentinel')) { | |
| xSentinelValues.add(headerValue) | |
| } | |
| } | |
| return ( | |
| <> | |
| <p> | |
| This page will exercise a number of APIs on the headers() instance by | |
| first awaiting it. This is the correct way to consume headers() and this | |
| test partially exists to ensure the behavior between sync and async | |
| access is consistent for the time where you are permitted to do either | |
| </p> | |
| <AllComponents | |
| headers={allHeaders} | |
| xSentinelValues={xSentinelValues} | |
| expression={'(await headers())'} | |
| /> | |
| <div id="page">{getSentinelValue()}</div> | |
| </> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 983 Bytes
- Xet hash:
- d7d32dce2fe0b50d68ceec2b5541b85c317e27e34e966d0ccda3657658e9b84a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.