Uh oh!
There was an error while loading. Please reload this page.
Cleaner way for redirecting back to the Referrer - #2692
Conversation
ee5ef6c to
ddec28bComparericordisamoa
commented
Jun 28, 2015
As this is a breaking change, though small, I wouldn't mind issuing a deprecation warning and waiting for 5.x instead. |
dougwilson
commented
Jun 28, 2015
Seems reasonable to me to remove the magic string value in 5.0 |
The 'back' special case has been moved from res.location() to a new req.back getter. In the future, this will make it possible to redirect to a regular 'back' page.
ricordisamoa
commented
Jun 28, 2015
Changed to emit |
ricordisamoa
commented
Jul 28, 2015
Any update? |
How is this any different than just Sidenote: If we are to keep this I suggest adding a test or two for |
5f268a4 to
9848645Comparericordisamoa
commented
Oct 18, 2015
@dougwilson what should I do? |
dougwilson
commented
Oct 18, 2015
I'm all for removing the magic string from Express 5.0, but yes, adding req.back is not a good replacement either, so what to replace it with needs to be thought on more. |
eb10dba to
340be0fCompareblakeembrey
commented
Aug 20, 2024
Hi @ricordisamoa, taking a look over this I agree with @gabeio's comment and believe we should remove this altogether. The main reasoning is that people should be more aware of blindly using referrer and we should try and direct them toward writing more explicit code, mostly because I realize this is a decade old PR though, so if you're not around I'll take this up and make a new PR in the next week. |
wesleytodd
commented
Aug 21, 2024
I fully agree @blakeembrey. Maybe in conjunction with removing this we could also add specific docs on how to properly handle this situation? |
wesleytodd
commented
Sep 10, 2024
I was unable to push to this branch, so I got the tests working and opened a new pr. #5932 |
The 'back' special case has been moved from
res.location()to a newreq.backgetter. In the future, this will make it possible to redirect to a regular 'back' page.