From: Mariusz Kozakowski <11mariom+wordpress@gmail.com> Date: Wed, 17 Sep 2014 16:44:29 +0000 (+0200) Subject: Add support for custom http port X-Git-Tag: 1.8.1^2~29^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2d4cfc58ec324987ad39365cbb3e4eb49df4e426;p=github%2Fwallabag%2Fwallabag.git Add support for custom http port Now you can use wallabag behind reverse proxy (i.e Squid or Varnish) without problem with urls like wallabag.example.com:8080. --- diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 93ec3fc6..beb4f30c 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -51,6 +51,7 @@ final class Tools $serverport = (!isset($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == '80' + || $_SERVER["SERVER_PORT"] == HTTP_PORT || ($https && $_SERVER["SERVER_PORT"] == '443') || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection ? '' : ':' . $_SERVER["SERVER_PORT"]); diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index 2a458544..f666f468 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -24,6 +24,8 @@ ################################################################################# # Do not trespass unless you know what you are doing ################################################################################# +// Change this if http is running on nonstandard port - i.e is behind cache proxy +@define ('HTTP_PORT', 80); // Change this if not using the standart port for SSL - i.e you server is behind sslh @define ('SSL_PORT', 443);