Skip to content

Commit d58988f

Browse files
author
Angular Builds
committed
b697145 build: update dependency bazel to v8.6.0
1 parent 23dc960 commit d58988f

7 files changed

Lines changed: 29 additions & 9 deletions

File tree

fesm2022/_validation-chunk.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ const INVALID_PREFIX_REGEX = /^[/\\]{2}|(?:^|[/\\])\.\.?(?:[/\\]|$)/;
66
function getFirstHeaderValue(value) {
77
return value?.toString().split(',', 1)[0]?.trim();
88
}
9-
function validateRequest(request, allowedHosts) {
9+
function validateRequest(request, allowedHosts, disableHostCheck) {
1010
validateHeaders(request);
11-
validateUrl(new URL(request.url), allowedHosts);
11+
if (!disableHostCheck) {
12+
validateUrl(new URL(request.url), allowedHosts);
13+
}
1214
}
1315
function validateUrl(url, allowedHosts) {
1416
const {

fesm2022/_validation-chunk.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fesm2022/ssr.mjs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,7 @@ function normalizeLocale(locale) {
14501450

14511451
class AngularAppEngine {
14521452
static ɵallowStaticRouteRender = false;
1453+
static ɵdisableAllowedHostsCheck = false;
14531454
static ɵhooks = new Hooks();
14541455
manifest = getAngularAppEngineManifest();
14551456
allowedHosts;
@@ -1460,18 +1461,27 @@ class AngularAppEngine {
14601461
}
14611462
async handle(request, requestContext) {
14621463
const allowedHost = this.allowedHosts;
1464+
const disableAllowedHostsCheck = AngularAppEngine.ɵdisableAllowedHostsCheck;
14631465
try {
1464-
validateRequest(request, allowedHost);
1466+
validateRequest(request, allowedHost, disableAllowedHostsCheck);
14651467
} catch (error) {
14661468
return this.handleValidationError(request.url, error);
14671469
}
14681470
const {
14691471
request: securedRequest,
14701472
onError: onHeaderValidationError
1471-
} = cloneRequestAndPatchHeaders(request, allowedHost);
1473+
} = disableAllowedHostsCheck ? {
1474+
request,
1475+
onError: null
1476+
} : cloneRequestAndPatchHeaders(request, allowedHost);
14721477
const serverApp = await this.getAngularServerAppForRequest(securedRequest);
14731478
if (serverApp) {
1474-
return Promise.race([onHeaderValidationError.then(error => this.handleValidationError(securedRequest.url, error)), serverApp.handle(securedRequest, requestContext)]);
1479+
const promises = [];
1480+
if (onHeaderValidationError) {
1481+
promises.push(onHeaderValidationError.then(error => this.handleValidationError(securedRequest.url, error)));
1482+
}
1483+
promises.push(serverApp.handle(securedRequest, requestContext));
1484+
return Promise.race(promises);
14751485
}
14761486
if (this.supportedLocales.length > 1) {
14771487
return this.redirectBasedOnAcceptLanguage(request);

fesm2022/ssr.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/ssr",
3-
"version": "22.0.0-next.0+sha-6a1471b",
3+
"version": "22.0.0-next.0+sha-b697145",
44
"description": "Angular server side rendering utilities",
55
"type": "module",
66
"license": "MIT",

types/_app-engine-chunk.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ declare class AngularAppEngine {
8686
* @private
8787
*/
8888
static ɵallowStaticRouteRender: boolean;
89+
/**
90+
* A flag to enable or disable the allowed hosts check.
91+
*
92+
* Typically used during development to avoid the allowed hosts check.
93+
*
94+
* @private
95+
*/
96+
static ɵdisableAllowedHostsCheck: boolean;
8997
/**
9098
* Hooks for extending or modifying the behavior of the server application.
9199
* These hooks are used by the Angular CLI when running the development server and

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fri Feb 27 2026 18:03:45 GMT+0000 (Coordinated Universal Time)
1+
Sat Feb 28 2026 02:05:34 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)