next.js/test/e2e/app-dir/use-cache-metadata-route-handler/app/robots.ts
robots.ts15 lines345 B
import type { MetadataRoute } from 'next'
import { getSentinelValue } from './sentinel'
import { setTimeout } from 'timers/promises'

export default async function robots(): Promise<MetadataRoute.Robots> {
  'use cache'

  // Simulate I/O
  await setTimeout(100)

  return {
    rules: { userAgent: '*', allow: `/${getSentinelValue()}` },
  }
}
Quest for Codev2.0.0
/
SIGN IN