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: respect 'force' and 'conditions' properties on redirects #38657

Merged
merged 6 commits into from Oct 24, 2023

Conversation

jenae-janzen
Copy link
Contributor

@jenae-janzen jenae-janzen commented Oct 23, 2023

(Moved from #38640)

https://linear.app/netlify/issue/FRA-19/force-is-not-honoured
https://linear.app/netlify/issue/FRA-21/conditions-on-redirects-are-not-honoured

When a redirect is created, it can accept a force parameter that can trigger the redirect even if the fromPath matches a piece of content. However, this functionality isn't working with the Adapter, possibly because the parameter isn't being passed along into the routes handler.

Description

Documentation

Tests

Related Issues

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 23, 2023
@jenae-janzen jenae-janzen changed the title move force redirects changes to main repo Fix: respect 'force' redirects Oct 23, 2023
@pieh pieh changed the title Fix: respect 'force' redirects fix: respect 'force' and 'conditions' properties on redirects Oct 24, 2023
@pieh pieh added topic: adapters Related to Gatsby Adapters and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 24, 2023
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Thank You!

@pieh pieh merged commit 48d311e into gatsbyjs:master Oct 24, 2023
30 of 33 checks passed
@pieh pieh added this to To cherry-pick in V5 Release hotfixes via automation Oct 24, 2023
pieh pushed a commit that referenced this pull request Oct 25, 2023
* move force redirects changes to main repo

* empty commit

* fix: conditions and add e2e test case

* test: fix country condition assertion

---------

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
(cherry picked from commit 48d311e)
@pieh pieh moved this from To cherry-pick to Backport PR opened in V5 Release hotfixes Oct 25, 2023
pieh pushed a commit that referenced this pull request Oct 26, 2023
#38664)

* move force redirects changes to main repo

* empty commit

* fix: conditions and add e2e test case

* test: fix country condition assertion

---------

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
(cherry picked from commit 48d311e)

Co-authored-by: Jenae Janzen <101715009+jenae-janzen@users.noreply.github.com>
@pieh pieh moved this from Backport PR opened to Backported in V5 Release hotfixes Oct 26, 2023
@pieh pieh moved this from Backported to Published in V5 Release hotfixes Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: adapters Related to Gatsby Adapters
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants