]> git.joonet.de Git - adminer.git/commitdiff
Support X-Forwarded-Prefix (e.g. Traefik PathPrefixStrip feature)
authorColin Mollenhour <colin@mollenhour.com>
Wed, 31 Jan 2018 17:11:03 +0000 (12:11 -0500)
committerJakub Vrana <jakub@vrana.cz>
Wed, 31 Jan 2018 19:38:14 +0000 (20:38 +0100)
adminer/include/bootstrap.inc.php
changes.txt

index a7ba05133f50b51c9d4040e36e1f8d4f063b4e27..83e8b679d31b72eab8340940ec737c9eeecc2a7e 100644 (file)
@@ -33,6 +33,9 @@ if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
 if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
        $_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
 }
+if ($_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
+       $_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
+}
 $HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");
 
 @ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
index 1cc6ea064b9b6be285ea09deb03cdbf0a5c9a939..927f62ec98eef7fb7e86ea58f873bf435a3c135a 100644 (file)
@@ -3,6 +3,7 @@ Fix counting selected rows after going back to select page
 PHP <5.3 compatibility even with Elasticsearch enabled
 Fully support functions in default values
 Stop redirecting links via adminer.org
+Support X-Forwarded-Prefix
 MySQL: Display warnings in SQL command
 MariaDB: Support JSON since MariaDB 10.2
 PostgreSQL: Support functions