2 Commits
Author SHA1 Message Date
mcndave 0f95171575 - Fixed HTTP_X_FORWARDED_HOST provided host 2026-10-19 19:20:58 +00:00
mcndave 131204d838 - removed composer.lock from files 2026-07-16 14:23:39 -04:00
2 changed files with 6 additions and 68 deletions

No files matched your search

Generated
-68
View File
@@ -1,68 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9771fcd7256da80520a2d0d0f95bf311",
"packages": [
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
+6
View File
@@ -210,9 +210,15 @@ PATTERN;
protected function domain() : string protected function domain() : string
{ {
# Forwarded from an SSL connected host
if ( ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) || ! empty($_SERVER['HTTP_X_FORWARDED_SSL']) ) { if ( ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) || ! empty($_SERVER['HTTP_X_FORWARDED_SSL']) ) {
$port = ""; $port = "";
} }
# Forwarded from another host
elseif ( !empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$port = explode(':', $_SERVER['HTTP_X_FORWARDED_HOST'])[1] ?? "";
}
# Default
else { else {
$port = $this->isDefaultPort() ? "" : ":" . $_SERVER['SERVER_PORT']; $port = $this->isDefaultPort() ? "" : ":" . $_SERVER['SERVER_PORT'];
} }