|
|
@ -8,6 +8,8 @@ define('REQUEST_REGEX', '/^https?:\/\/.+\/(?<supplier>' . SUPPLIER_REGEX . ')\/? |
|
|
|
define('ACTION_REGEX', '/^[a-z]{1,16}$/i'); |
|
|
|
|
|
|
|
$baseUrl = trim((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '/'); |
|
|
|
if (($pos = strpos($baseUrl, '?')) !== false) |
|
|
|
$baseUrl = substr($baseUrl, 0, $pos); |
|
|
|
$requestUrl = trim(array_key_exists('QUERY_STRING', $_SERVER) ? str_replace($_SERVER['QUERY_STRING'], '', $baseUrl) : $baseUrl, '?'); |
|
|
|
|
|
|
|
if (preg_match(REQUEST_REGEX, $requestUrl, $match)) { |
|
|
|