我努力解决一个 404 页面,该页面返回给导航器/爬虫特定的 HTTP 状态代码:404。按照https://angular.io/guide/universal 中的SSR 指南,我的应用程序正确地使用了 SSR。
我在 app-routing.module.ts 中设置了“PageNotfound”路由:
{path: '*', component: NotFoundComponent}Run Code Online (Sandbox Code Playgroud)
但显然它仍然返回 200 作为 http 返回状态。如何更改此特定路由的 http 返回码?