Support X-Forwarded-Prefix (e.g. Traefik PathPrefixStrip feature)

This commit is contained in:
Colin Mollenhour 2018-01-31 12:11:03 -05:00 committed by Jakub Vrana
parent e32f90f8ff
commit 080fd0f374
2 changed files with 4 additions and 0 deletions

View 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

View 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