We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f99724 commit 7e01089Copy full SHA for 7e01089
packages/angular/ssr/src/utils/validation.ts
@@ -224,7 +224,12 @@ function verifyHostAllowed(
224
throw new Error(`Header "${headerName}" contains an invalid value and cannot be parsed.`);
225
}
226
227
- const { hostname } = new URL(url);
+ const { hostname, port } = new URL(url);
228
+ if (port) {
229
+ throw new Error(
230
+ `Header "${headerName}" with value "${value}" contains a port and is not allowed.`,
231
+ );
232
+ }
233
if (!isHostAllowed(hostname, allowedHosts)) {
234
throw new Error(`Header "${headerName}" with value "${value}" is not allowed.`);
235
0 commit comments