Skip to content

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Oct 8, 2025

Changes

  • Some tests were failing, this fixes them

Testing

  • Updates them to use the new allowedDomains feature

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: b97e24e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 8, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 8, 2025

CodSpeed Performance Report

Merging #14505 will not alter performance

Comparing allowed-domains-tests (b97e24e) with main (ec307b0)

Summary

✅ 6 untouched


// Validate X-Forwarded-Host against allowedDomains if configured
if (forwardedHost && !this.matchesAllowedDomains(forwardedHost, protocol)) {
if (forwardedHost && !this.matchesAllowedDomains(forwardedHost, protocol?.replace(':', ''))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this replace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when the host header includes a port, ala example.com:8080

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's when the protocol includes a : actually, I just noticed the code above, so https: -> https, got it

@matthewp matthewp merged commit 28b2a1d into main Oct 8, 2025
22 checks passed
@matthewp matthewp deleted the allowed-domains-tests branch October 8, 2025 16:31
@astrobot-houston astrobot-houston mentioned this pull request Oct 8, 2025
florian-lefebvre added a commit that referenced this pull request Oct 13, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Houston (Bot) <[email protected]>
Co-authored-by: Bartosz Kapciak <[email protected]>
Co-authored-by: Bartosz Kapciak <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Abdelrahman Abdelfattah <[email protected]>
Co-authored-by: Alasdair McLeay <[email protected]>
Fix failing x-forwarded-host tests (#14505)
fix(prefetch): Fix "tap" prefetch strategy when view transitions are enabled (#14235)
fix `security.allowedDomains` version (#14509)
Fix compatibility with older Astro versions in @astrojs/node (#14514)
Fixes #14513
fix heading level in config reference docs (#14517)
fix(deps): update all non-major dependencies (#14522)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants