We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dafbb1b commit 535fa36Copy full SHA for 535fa36
1 file changed
packages/astro/src/core/app/index.ts
@@ -251,7 +251,9 @@ export class App {
251
// Include validated port if available, otherwise use port from forwardedHost if present
252
const portFromHost = sanitized.includes(':') ? sanitized.split(':')[1] : undefined;
253
const portForValidation = result.port || portFromHost;
254
- const hostWithPort = portForValidation ? `${hostnameOnly}:${portForValidation}` : hostnameOnly;
+ const hostWithPort = portForValidation
255
+ ? `${hostnameOnly}:${portForValidation}`
256
+ : hostnameOnly;
257
const testUrl = new URL(`${protoForValidation}://${hostWithPort}`);
258
const isAllowed = allowedDomains.some((pattern) => matchPattern(testUrl, pattern));
259
if (isAllowed) {
0 commit comments