mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
01d091bf9c
The aria menubar guide content is 2.9 MB, over the 2 MiB maxResponseBodySize set in #69379. The fetch fails during prerender, the navigation error handler redirects to /404, and the prerendered page is saved as that redirect. Opening /guide/aria/menubar directly or refreshing it lands on the 404 page. Raise the limit to 4 MiB. The combobox guide was also within 27 KB of the old limit.
23 lines
700 B
TypeScript
23 lines
700 B
TypeScript
/*!
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
import {mergeApplicationConfig, ApplicationConfig} from '@angular/core';
|
|
import {provideServerRendering, withRoutes, RenderMode} from '@angular/ssr';
|
|
import {appConfig} from './app.config';
|
|
|
|
const serverConfig: ApplicationConfig = {
|
|
providers: [
|
|
provideServerRendering(
|
|
{maxResponseBodySize: 4 * 1024 * 1024},
|
|
withRoutes([{path: '**', renderMode: RenderMode.Prerender}]),
|
|
),
|
|
],
|
|
};
|
|
|
|
export const config: ApplicationConfig = mergeApplicationConfig(appConfig, serverConfig);
|