. */ declare(strict_types=1); namespace FireflyIII\Http\Middleware; use Illuminate\Http\Request; use Illuminate\Session\Middleware\StartSession; /** * @codeCoverageIgnore * Class StartFireflySession. */ class StartFireflySession extends StartSession { /** * Store the current URL for the request if necessary. * * @param \Illuminate\Http\Request $request * @param \Illuminate\Contracts\Session\Session $session */ protected function storeCurrentUrl(Request $request, $session) { $uri = $request->fullUrl(); $strpos = strpos($uri, 'jscript'); if (false === $strpos && 'GET' === $request->method() && $request->route() && !$request->ajax()) { $session->setPreviousUrl($uri); } } }