@angular/platform-server 22.0.0-next.9 → 22.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/init.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.9
2
+ * @license Angular v22.0.0-rc.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.9
2
+ * @license Angular v22.0.0-rc.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -83,9 +83,7 @@ interface PlatformConfig {
83
83
  document?: string;
84
84
  /**
85
85
  * The URL for the current application state. This is used for initializing
86
- * the platform's location. `protocol`, `hostname`, and `port` will be
87
- * overridden if `baseUrl` is set.
88
- * @default none
86
+ * the platform's location. `protocol`, `hostname`, and `port`.
89
87
  */
90
88
  url?: string;
91
89
  }
@@ -129,13 +127,14 @@ declare const SERVER_CONTEXT: InjectionToken<string>;
129
127
  * as a reference to the `document` instance.
130
128
  * - `url` - the URL for the current render request.
131
129
  * - `extraProviders` - set of platform level providers for the current render request.
132
- *
130
+ * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
133
131
  * @publicApi
134
132
  */
135
133
  declare function renderModule<T>(moduleType: Type<T>, options: {
136
134
  document?: string | Document;
137
135
  url?: string;
138
136
  extraProviders?: StaticProvider[];
137
+ allowedHosts?: Readonly<string>[];
139
138
  }): Promise<string>;
140
139
  /**
141
140
  * Bootstraps an instance of an Angular application and renders it to a string.
@@ -162,6 +161,7 @@ declare function renderModule<T>(moduleType: Type<T>, options: {
162
161
  * as a reference to the `document` instance.
163
162
  * - `url` - the URL for the current render request.
164
163
  * - `platformProviders` - the platform level providers for the current render request.
164
+ * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
165
165
  *
166
166
  * @returns A Promise, that returns serialized (to a string) rendered page, once resolved.
167
167
  *
@@ -171,7 +171,17 @@ declare function renderApplication(bootstrap: (context: BootstrapContext) => Pro
171
171
  document?: string | Document;
172
172
  url?: string;
173
173
  platformProviders?: Provider[];
174
+ allowedHosts?: Readonly<string>[];
174
175
  }): Promise<string>;
176
+ /**
177
+ * Checks if the hostname is allowed.
178
+ * @param hostname - The hostname to check.
179
+ * @param allowedHosts - A set of allowed hostnames.
180
+ * @returns `true` if the hostname is allowed, `false` otherwise.
181
+ * @note Used also in `@angular/ssr`.
182
+ * @private
183
+ */
184
+ declare function isHostAllowed(hostname: string, allowedHosts: ReadonlySet<string>): boolean;
175
185
 
176
186
  /**
177
187
  * DOM Adapter for the server platform based on https://github.com/fgnass/domino.
@@ -203,5 +213,5 @@ declare class DominoAdapter extends _BrowserDomAdapter {
203
213
  */
204
214
  declare const VERSION: Version;
205
215
 
206
- export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, DominoAdapter as ɵDominoAdapter, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, renderInternal as ɵrenderInternal };
216
+ export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, DominoAdapter as ɵDominoAdapter, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, isHostAllowed as ɵisHostAllowed, renderInternal as ɵrenderInternal };
207
217
  export type { PlatformConfig };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.9
2
+ * @license Angular v22.0.0-rc.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */