Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new allowedHosts option #13278

Merged
merged 8 commits into from
Feb 26, 2025
Merged

feat: add new allowedHosts option #13278

merged 8 commits into from
Feb 26, 2025

Conversation

ematipico
Copy link
Member

Changes

Closes #13060

This PR adds a new allowedHosts and --allowed-hosts options.

This options isn't passed to the node adapter yet, we will have to figure out how to use it in the preview server.

Testing

I don't know how to test this functionality, help would be appreciated.

Docs

Will send a PR

Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: d11d3e4

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 pkg: astro Related to the core `astro` package (scope) docs pr semver: minor Change triggers a `minor` release labels Feb 20, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@ematipico ematipico force-pushed the feat/add-allowed-hosts branch from 7e674ad to 84d8fcf Compare February 20, 2025 14:32
Copy link

codspeed-hq bot commented Feb 20, 2025

CodSpeed Performance Report

Merging #13278 will not alter performance

Comparing feat/add-allowed-hosts (d11d3e4) with main (509fa67)

Summary

✅ 6 untouched benchmarks

@ematipico ematipico added the pr preview This PR has a preview release label Feb 21, 2025
Copy link

pkg-pr-new bot commented Feb 21, 2025

astro

npm i https://pkg.pr.new/astro@13278

@astrojs/cloudflare

npm i https://pkg.pr.new/@astrojs/cloudflare@13278

@astrojs/netlify

npm i https://pkg.pr.new/@astrojs/netlify@13278

@astrojs/node

npm i https://pkg.pr.new/@astrojs/node@13278

@astrojs/vercel

npm i https://pkg.pr.new/@astrojs/vercel@13278

commit: 727c386

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

I think my concern is that we are a bit conflicting with the vite option. What happens to it? Is it not used at all anymore? Should we warn if used?

Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

LGTM, I just left some nit related to the doc.

Co-authored-by: Armand Philippot <[email protected]>
@florian-lefebvre florian-lefebvre added this to the 5.4.0 milestone Feb 21, 2025
@ematipico ematipico added - P1: chore Doesn't change code behavior (priority) and removed pr preview This PR has a preview release labels Feb 21, 2025
@ematipico ematipico added - P1: chore Doesn't change code behavior (priority) and removed - P1: chore Doesn't change code behavior (priority) labels Feb 21, 2025
@ematipico ematipico added - P1: chore Doesn't change code behavior (priority) pr preview This PR has a preview release and removed - P1: chore Doesn't change code behavior (priority) pr preview This PR has a preview release labels Feb 21, 2025
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Looks great here, just some small thoughts!

Fun fact, I literally just configured vite.server.allowHosts myself yesterday to allow my dev server to work in Gitpod 😄

Also noting that I didn't notice any new error messages added along with this feature.

Co-authored-by: Sarah Rainsberger <[email protected]>
@ematipico ematipico merged commit 4a43c4b into main Feb 26, 2025
14 of 16 checks passed
@ematipico ematipico deleted the feat/add-allowed-hosts branch February 26, 2025 10:33
@astrobot-houston astrobot-houston mentioned this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P1: chore Doesn't change code behavior (priority) docs pr pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aastro preview doesn't respect vite preview allowedHostnames in astro config
6 participants