diff --git a/composer.json b/composer.json index 35d2ae5..007a9ff 100644 --- a/composer.json +++ b/composer.json @@ -23,13 +23,13 @@ "laravel/framework": "^9.0 || >=8.40.0 || ^7.0", "zircote/swagger-php": "^3.2 || ^4.0", "swagger-api/swagger-ui": "^3.0 || ^4.0", - "symfony/yaml": "^5.0", + "symfony/yaml": "^5.0 || ^6.0", "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "^9.5", "mockery/mockery": "1.*", - "orchestra/testbench": "6.* || 5.*", + "orchestra/testbench": "7.* || ^6.15 || 5.*", "php-coveralls/php-coveralls": "^2.0" }, "autoload": { diff --git a/src/Http/Controllers/SwaggerController.php b/src/Http/Controllers/SwaggerController.php index 415d739..2cac00d 100644 --- a/src/Http/Controllers/SwaggerController.php +++ b/src/Http/Controllers/SwaggerController.php @@ -108,7 +108,14 @@ public function api(Request $request) if (! is_array($proxy)) { $proxy = [$proxy]; } - Request::setTrustedProxies($proxy, Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies( + $proxy, + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB + ); } $urlToDocs = $this->generateDocumentationFileURL($documentation, $config);