mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
Support X-Forwarded-Prefix (e.g. Traefik PathPrefixStrip feature)
This commit is contained in:
committed by
Jakub Vrana
parent
e32f90f8ff
commit
080fd0f374
@@ -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
|
||||
|
Reference in New Issue
Block a user