Files
Shuaib Hasan Akib c0c97b5b22 docs(platform-server): add error reference page for NG05703 and wire up RuntimeError
Add a dedicated error reference page for NG05703 (suspicious URL origin
change during SSR) and update the error to use RuntimeError with a
negative code so the error message automatically includes a link to the
docs page in both dev and production builds.

Update affected tests in url_spec.ts, platform_location_spec.ts, and
integration_spec.ts to match the new NG05703-prefixed error message
format.

Fixes: #69667
(cherry picked from commit 13b6bbd6a0)
2026-07-09 11:56:06 -07:00

2.8 KiB

API Report File for "@angular/platform-server"

Do not edit this file. It is a report generated by API Extractor.


import { ApplicationRef } from '@angular/core';
import { BootstrapContext } from '@angular/platform-browser';
import { EnvironmentProviders } from '@angular/core';
import * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser';
import { InjectionToken } from '@angular/core';
import { PlatformRef } from '@angular/core';
import { Provider } from '@angular/core';
import { StaticProvider } from '@angular/core';
import { Type } from '@angular/core';
import { Version } from '@angular/core';

// @public
export const BEFORE_APP_SERIALIZED: InjectionToken<readonly (() => void | Promise<void>)[]>;

// @public
export const INITIAL_CONFIG: InjectionToken<PlatformConfig>;

// @public
export interface PlatformConfig {
    document?: string;
    url?: string;
}

// @public
export function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef;

// @public
export class PlatformState {
    constructor(_doc: any);
    getDocument(): any;
    renderToString(): string;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<PlatformState, never>;
    // (undocumented)
    static ɵprov: i0.ɵɵInjectableDeclaration<PlatformState>;
}

// @public
export function provideServerRendering(options?: {
    maxResponseBodySize: number;
}): EnvironmentProviders;

// @public
export function renderApplication(bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>, options: {
    document?: string | Document;
    url?: string;
    platformProviders?: Provider[];
    allowedHosts?: Readonly<string>[];
}): Promise<string>;

// @public
export function renderModule<T>(moduleType: Type<T>, options: {
    document?: string | Document;
    url?: string;
    extraProviders?: StaticProvider[];
    allowedHosts?: Readonly<string>[];
}): Promise<string>;

// @public
export const enum RuntimeErrorCode {
    // (undocumented)
    DISABLED_DOM_EMULATION_IN_NON_BROWSER = 5704,
    // (undocumented)
    GET_COOKIE_NOT_IMPLEMENTED = 5700,
    // (undocumented)
    HOST_NOT_ALLOWED = 5706,
    // (undocumented)
    INVALID_URL = 5701,
    // (undocumented)
    PROTOCOL_RELATIVE_URL_NOT_ALLOWED = 5702,
    // (undocumented)
    SUSPICIOUS_URL_CHANGE_ORIGIN = -5703,
    // (undocumented)
    XHR_NOT_LOADED = 5705
}

// @public
export class ServerModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<ServerModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<ServerModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<ServerModule, never, never, [typeof i1.BrowserModule]>;
}

// @public (undocumented)
export const VERSION: Version;

// (No @packageDocumentation comment for this package)