next.js/test/e2e/app-dir/react-max-headers-length/app/layout.tsx
layout.tsx24 lines561 B
import { ReactNode } from 'react'
import { preload } from 'react-dom'

export default function Root({ children }: { children: ReactNode }) {
  // Each of these preloads will emit a link header that will consist of about
  // 105 characters.
  for (let i = 0; i < 100; i++) {
    preload(
      '/?q=some+string+that+spans+lots+of+characters&i=' +
        String(i).padStart(2, '0'),
      {
        as: 'font',
        type: 'font/woff2',
        crossOrigin: 'anonymous',
      }
    )
  }
  return (
    <html>
      <body>{children}</body>
    </html>
  )
}
Quest for Codev2.0.0
/
SIGN IN