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

fix(redirects): attempt to get only params in dev mode #8647

Merged
merged 4 commits into from
Sep 27, 2023

Conversation

lilnasy
Copy link
Contributor

@lilnasy lilnasy commented Sep 23, 2023

Changes

Testing

Adapted from repro.

Docs

Does not affect usage.

@changeset-bot
Copy link

changeset-bot bot commented Sep 23, 2023

🦋 Changeset detected

Latest commit: 3748cbf

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 Sep 23, 2023
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.

Plain and simple 👊👌

Comment on lines +203 to 206
it.skip('falls back to spread rule when dynamic rules should not match', async () => {
const response = await fixture.fetch('/more/old/welcome/world', { redirect: 'manual' });
expect(response.headers.get('Location')).to.equal('/more/new/welcome/world');
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll let someone else tackle this.

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.

Looks great

@matthewp matthewp merged commit 408b50c into withastro:main Sep 27, 2023
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Sep 28, 2023
@lilnasy lilnasy deleted the fix-8639 branch September 30, 2023 13:29
@felixfrey
Copy link
Contributor

Hi, i am still using Astro 2.10 and I'm not ready to upgrade to Astro 3. Can you release this fix also for all affected 2.x versions?

@lilnasy
Copy link
Contributor Author

lilnasy commented Oct 10, 2023

We don't have a system setup for that case. This is a small change, however. I'd recommend publishing an npm package for yourself with dist/core/render/params-and-props.js edited.

"dependencies": {
  "astro": "npm:felixfrey-astro@2.10.16"
}

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.

Dynamic routes in Astro redirects error
4 participants