use Laminas\Diactoros\Response\RedirectResponse;
use Laminas\Diactoros\ServerRequestFactory;
+use Laminas\Diactoros\ServerRequestFilter\FilterUsingXForwardedHeaders;
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
}
}
- $psrRequest = ServerRequestFactory::fromGlobals();
+ $psrRequest = ServerRequestFactory::fromGlobals(
+ requestFilter: FilterUsingXForwardedHeaders::trustProxies(
+ ['*'],
+ [FilterUsingXForwardedHeaders::HEADER_PROTO]
+ )
+ );
$builtRequest = $this->buildRequest($psrRequest, $application);