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

Allow router.redirect() to accept external destinations #110

Merged
merged 4 commits into from
Nov 2, 2020
Merged

Allow router.redirect() to accept external destinations #110

merged 4 commits into from
Nov 2, 2020

Conversation

apancutt
Copy link
Contributor

Currently router.redirect() only accepts route names or absolute URLs. External URLs (e.g. https://www.example.com) will be treated as a route name resulting in a route-not-found error.

@dominicegginton
Copy link
Contributor

Hi @apancutt thank you for your contribution. Please can you write some unit tests for this ?

@apancutt
Copy link
Contributor Author

apancutt commented Nov 2, 2020

Tests were added, @dominicegginton. Do you have an ETA for the next version?

@niftylettuce
Copy link
Contributor

one sec

@niftylettuce niftylettuce merged commit 89b7c02 into koajs:master Nov 2, 2020
@niftylettuce
Copy link
Contributor

v10.0.0 released to npm https://github.com/koajs/router/releases/tag/v10.0.0

@domnantas
Copy link

Was this a breaking change? Why was this a major version bump?

@dominicegginton
Copy link
Contributor

dominicegginton commented Mar 25, 2021

@domnantas This PR implements a breaking change so required a major version bump.

@domnantas
Copy link

I'm trying to understand how exactly this is a breaking change. How should I update my application so it wouldn't break after updating Koa router?

I'm having trouble understanding how https://github.com/koajs/router/pull/110/files#diff-f2e6763bf8bb6c8d2158eccc82da1212d91d40dd73a3e110c1c4c3a3382fc5a6R535 could be a breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants