From: Vincent Vanwaelscappel Date: Tue, 5 Aug 2025 10:24:25 +0000 (+0200) Subject: wait #7673 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=876db70bca2ae18571a1370f5507d56f99129e8d;p=cubist_cms-back.git wait #7673 @0.5 --- diff --git a/src/app/Middleware/StartSession.php b/src/app/Middleware/StartSession.php new file mode 100644 index 0000000..4ac94e6 --- /dev/null +++ b/src/app/Middleware/StartSession.php @@ -0,0 +1,21 @@ +isMethod('GET') && + $request->route() instanceof Route && + !in_array($request->route()->getName(), ['cdnproxy']) && + !$request->ajax() && + !$request->prefetch() && + !$request->isPrecognitive()) { + $session->setPreviousUrl($request->fullUrl()); + } + } +} diff --git a/src/routes/cubist/backpack/cdnproxy.php b/src/routes/cubist/backpack/cdnproxy.php index 1fc8154..2023778 100644 --- a/src/routes/cubist/backpack/cdnproxy.php +++ b/src/routes/cubist/backpack/cdnproxy.php @@ -26,5 +26,5 @@ Route::group([ copy($url, $cache); } return \Cubist\Backpack\Http\Controllers\Base\XSendFileController::sendfile($cache); - })->where(['url' => '.*']); + })->where(['url' => '.*'])->name('cdnproxy'); });