Added support for SSL-Proxies
authorAlexander Ebert <ebert@woltlab.com>
Sat, 8 Mar 2014 13:22:31 +0000 (14:22 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Mar 2014 13:22:31 +0000 (14:22 +0100)
wcfsetup/install/files/lib/system/request/RouteHandler.class.php

index bafbdf85cd3e449cd582d9fa744dd3076c464d97..c224f6052defdd6d7f72255eb59da97628327b8f 100644 (file)
@@ -191,7 +191,7 @@ class RouteHandler extends SingletonFactory {
                if (self::$secure === null) {
                        self::$secure = false;
                        
-                       if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443) {
+                       if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443 || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
                                self::$secure = true;
                        }
                }