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

Add server island route to the front of the route list #12263

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

Fryuni
Copy link
Member

@Fryuni Fryuni commented Oct 19, 2024

Changes

The route was being added as the last route in the list, making it the lowest priority. The solution would be to either add it before the routes are sorted by priority or make it higher than other routes.

IMO internal routes should come first since they are required for native Astro features to work, so adding it to the front of the list is enough. If we think they should follow the normal route priority then the fix is different (insert the route based on the priority rules).

Testing

Added a conflicting route on the e2e test fixture to reproduce the problem.

Docs

Maybe document the prefixes reserved for Astro functionality (_server-islands/, _actions/ and _astro/)

Copy link

changeset-bot bot commented Oct 19, 2024

🦋 Changeset detected

Latest commit: 394e5e1

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 19, 2024
@Fryuni Fryuni requested review from matthewp and ematipico October 19, 2024 21:40
Copy link
Member

@martrapp martrapp left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Looks good to me. If possible, I would send a PR to the docs as you suggested. I think it's important to set expectations for the users (and us).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

beat me to it, thanks so much!

@matthewp matthewp merged commit e9e8080 into main Oct 21, 2024
13 checks passed
@matthewp matthewp deleted the fryuni/server-island-dynamic-route-conflict branch October 21, 2024 16:13
@astrobot-houston astrobot-houston mentioned this pull request Oct 21, 2024
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.

Catch all page ([...slug].astro) catch all Server island requests
4 participants