1 |
robbat2 08/11/24 06:09:44 |
2 |
|
3 |
Modified: functions.php |
4 |
Log: |
5 |
If running phpBB on Apache behind a Squid reverse proxy that provides the HTTPS, you need to use "cache_peer ... front-end-https" in Squid, as well as check the HTTP_FRONT_END_HTTPS variable inside PHP to safely detect HTTPS. |
6 |
|
7 |
Revision Changes Path |
8 |
1.24 forums/htdocs/includes/functions.php |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.24&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.24&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/includes/functions.php?r1=1.23&r2=1.24 |
13 |
|
14 |
Index: functions.php |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/includes/functions.php,v |
17 |
retrieving revision 1.23 |
18 |
retrieving revision 1.24 |
19 |
diff -p -w -b -B -u -u -r1.23 -r1.24 |
20 |
--- functions.php 9 Sep 2007 11:08:20 -0000 1.23 |
21 |
+++ functions.php 24 Nov 2008 06:09:44 -0000 1.24 |
22 |
@@ -7,7 +7,7 @@ |
23 |
* copyright : (C) 2001 The phpBB Group |
24 |
* email : support@×××××.com |
25 |
* |
26 |
- * $Id: functions.php,v 1.23 2007/09/09 11:08:20 tomk Exp $ |
27 |
+ * $Id: functions.php,v 1.24 2008/11/24 06:09:44 robbat2 Exp $ |
28 |
* |
29 |
* |
30 |
***************************************************************************/ |
31 |
@@ -1066,7 +1066,7 @@ function redirect($url) |
32 |
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); |
33 |
} |
34 |
|
35 |
- $server_protocol = (isset($_SERVER['HTTPS']) || $board_config['cookie_secure']) ? 'https://' : 'http://'; |
36 |
+ $server_protocol = (isset($_SERVER['HTTPS']) || isset($_SERVER["HTTP_FRONT_END_HTTPS"]) || $board_config['cookie_secure']) ? 'https://' : 'http://'; |
37 |
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); |
38 |
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; |
39 |
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); |