aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-12-27 22:57:30 +0100
committerGravatar GitHub <noreply@github.com> 2018-12-27 22:57:30 +0100
commite9d50f48eb376766ebdb4a7d7e10d15bf863d5a7 (patch)
tree54a58fb08802e7b6e5ae3f9d9c797da4ee526b81 /app
parent06ea2626e804dd24c2d84fa26c8febf29ef3d357 (diff)
HTTP_X_FORWARDED_PREFIX for cookie path (#2201)
Forgotten. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2191
Diffstat (limited to 'app')
-rw-r--r--app/install.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/install.php b/app/install.php
index dc79c2388..b15cc76ea 100644
--- a/app/install.php
+++ b/app/install.php
@@ -7,7 +7,8 @@ header("Content-Security-Policy: default-src 'self'");
require(LIB_PATH . '/lib_install.php');
session_name('FreshRSS');
-session_set_cookie_params(0, dirname(empty($_SERVER['REQUEST_URI']) ? '/' : dirname($_SERVER['REQUEST_URI'])), null, false, true);
+$forwardedPrefix = empty($_SERVER['HTTP_X_FORWARDED_PREFIX']) ? '' : rtrim($_SERVER['HTTP_X_FORWARDED_PREFIX'], '/ ');
+session_set_cookie_params(0, $forwardedPrefix . dirname(empty($_SERVER['REQUEST_URI']) ? '/' : dirname($_SERVER['REQUEST_URI'])), null, false, true);
session_start();
if (isset($_GET['step'])) {