response.redirect: extract special-cased back, fixes #904 by fl0w · Pull Request #1115 · koajs/koa (original) (raw)

@fl0w fl0w mentioned this pull request

Feb 7, 2018

@fl0w fl0w mentioned this pull request

Feb 14, 2018

ricordisamoa

3imed-jaberi

@fl0w @kevinpeno

@kevinpeno

titanism added a commit to forwardemail/forwardemail.net that referenced this pull request

Jan 5, 2026

@titanism

…oa v3

Koa v3 removes ctx.redirect('back') and replaces it with ctx.back(fallbackUrl). This polyfill intercepts ctx.redirect('back') calls and converts them to use the Referer header with a fallback URL, maintaining backward compatibility with the 34 existing usages in the codebase.

@see https://github.com/koajs/koa/releases/tag/v3.0.0 @see koajs/koa#1115

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})