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 redirect support #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylejreed
Copy link
Contributor

Closes #12

Introduces a Context.redirect(url, alt, options) which sets up the proper headers for performing a redirect.

From Koa, passing back as the url will attempt to use the Referrer header, and fallback to the alt parameter (ex. Context.redirect('back', '/index.html'))

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.

Add an easy way to redirect to another site
1 participant