NextResponse Object
NextResponse
The NextResponse
API allows you to:
- Redirect the incoming request to a different URL
- Rewrite the response by displaying a given URL
- Set request headers for
API Routes
,getServerSideProps
, and rewrite destinations - Set
response cookies
- Set
response headers