aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/ShaarliMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/ShaarliMiddleware.php')
-rw-r--r--application/front/ShaarliMiddleware.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php
index 595182ac..e9f5552d 100644
--- a/application/front/ShaarliMiddleware.php
+++ b/application/front/ShaarliMiddleware.php
@@ -62,7 +62,9 @@ class ShaarliMiddleware
62 62
63 return $response->write($this->container->pageBuilder->render('error')); 63 return $response->write($this->container->pageBuilder->render('error'));
64 } catch (UnauthorizedException $e) { 64 } catch (UnauthorizedException $e) {
65 return $response->withRedirect($this->container->basePath . '/login'); 65 $returnUrl = urlencode($this->container->environment['REQUEST_URI']);
66
67 return $response->withRedirect($this->container->basePath . '/login?returnurl=' . $returnUrl);
66 } catch (\Throwable $e) { 68 } catch (\Throwable $e) {
67 // Unknown error encountered 69 // Unknown error encountered
68 $this->container->pageBuilder->reset(); 70 $this->container->pageBuilder->reset();