aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMariusz Kozakowski <11mariom+wordpress@gmail.com>2014-09-17 18:44:29 +0200
committerMariusz Kozakowski <11mariom+wordpress@gmail.com>2014-09-23 18:44:14 +0200
commit2d4cfc58ec324987ad39365cbb3e4eb49df4e426 (patch)
treecdfbba46e641149cd9df6229c0d882136fe3fb17
parenta15108e65b12ceaf50821783bcaa1ee3fee10d13 (diff)
downloadwallabag-2d4cfc58ec324987ad39365cbb3e4eb49df4e426.tar.gz
wallabag-2d4cfc58ec324987ad39365cbb3e4eb49df4e426.tar.zst
wallabag-2d4cfc58ec324987ad39365cbb3e4eb49df4e426.zip
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.
-rwxr-xr-xinc/poche/Tools.class.php1
-rwxr-xr-xinc/poche/config.inc.default.php2
2 files changed, 3 insertions, 0 deletions
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
51 51
52 $serverport = (!isset($_SERVER["SERVER_PORT"]) 52 $serverport = (!isset($_SERVER["SERVER_PORT"])
53 || $_SERVER["SERVER_PORT"] == '80' 53 || $_SERVER["SERVER_PORT"] == '80'
54 || $_SERVER["SERVER_PORT"] == HTTP_PORT
54 || ($https && $_SERVER["SERVER_PORT"] == '443') 55 || ($https && $_SERVER["SERVER_PORT"] == '443')
55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection 56 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
56 ? '' : ':' . $_SERVER["SERVER_PORT"]); 57 ? '' : ':' . $_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 @@
24################################################################################# 24#################################################################################
25# Do not trespass unless you know what you are doing 25# Do not trespass unless you know what you are doing
26################################################################################# 26#################################################################################
27// Change this if http is running on nonstandard port - i.e is behind cache proxy
28@define ('HTTP_PORT', 80);
27 29
28// Change this if not using the standart port for SSL - i.e you server is behind sslh 30// Change this if not using the standart port for SSL - i.e you server is behind sslh
29@define ('SSL_PORT', 443); 31@define ('SSL_PORT', 443);