Reference
rewrite
Creates an internal rewrite response consumed by app-router middleware. The target must be a same-origin route path, query, hash, or relative URL; protocol-relative, external, and control-character targets are rejected.
Signature
function rewrite(location: string, init: ResponseInit): Response