mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-15 22:45:55 +00:00
Apply fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
5b7a80bb0c
commit
da39fb8ad8
@@ -92,7 +92,7 @@ class HttpClient
|
|||||||
])
|
])
|
||||||
->send($request)
|
->send($request)
|
||||||
->then(function (ResponseInterface $response) use ($proxyConnection) {
|
->then(function (ResponseInterface $response) use ($proxyConnection) {
|
||||||
if (!isset($response->buffer)) {
|
if (! isset($response->buffer)) {
|
||||||
$response = $this->rewriteResponseHeaders($response);
|
$response = $this->rewriteResponseHeaders($response);
|
||||||
|
|
||||||
$response->buffer = str($response);
|
$response->buffer = str($response);
|
||||||
@@ -139,13 +139,13 @@ class HttpClient
|
|||||||
|
|
||||||
protected function rewriteResponseHeaders(ResponseInterface $response)
|
protected function rewriteResponseHeaders(ResponseInterface $response)
|
||||||
{
|
{
|
||||||
if (!$response->hasHeader('Location')) {
|
if (! $response->hasHeader('Location')) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
$location = $response->getHeaderLine('Location');
|
$location = $response->getHeaderLine('Location');
|
||||||
|
|
||||||
if (!strstr($location, $this->connectionData->host)) {
|
if (! strstr($location, $this->connectionData->host)) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user