CodeIgniter Forums
Can a controller method be excluded from redirect()->back()? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Can a controller method be excluded from redirect()->back()? (/showthread.php?tid=81773)



Can a controller method be excluded from redirect()->back()? - navblue - 04-26-2022

Is there a way to exclude a controller method from being added to redirect()->back()? 
For example, say I have a function that returns an image or file directly to the browser. I wouldn't necessarily want that function to be included in ->back().  Is there anyway to prevent this?


RE: Can a controller method be excluded from redirect()->back()? - navblue - 04-26-2022

Nevermind, I see DownloadResponse is ignored and I need to update my image download to use $response->download()