next.js
ee2bd3f0 - fix duplicated noindex when server action is triggered (#76847)

Commit
1 year ago
fix duplicated noindex when server action is triggered (#76847) ### What When client sends and Server Action request with `notFound()` inside, next-server will serve the RSC payload in response but we were also serving a fallback `robots=noindex` metadata for 404 requests. This will be a conflict for users custom metadata. The fallback `robots=noindex` for 404 response was for initially for pages rendering request. Here we skip it for the dynamic RSC to avoid user's metadata being de-prioritized due to the fallback `robots=noindex` taking precedence. We also add a test that it won't break form action, where when JS is disabled and notFound involked, the new page can still be served with fallback noindex Fixes NDX-953
Author
Parents
Loading