Skip to content

Commit

Permalink
♻️ Rewrite the port logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Aug 3, 2019
1 parent 7a10283 commit 74bd607
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,11 @@ public function to($target)

$target = new Uri($target);

// Overwrite target scheme and host.
// Overwrite target scheme, host and port.
$uri = $this->request->getUri()
->withScheme($target->getScheme())
->withHost($target->getHost());

// Check for custom port.
if ($port = $target->getPort()) {
$uri = $uri->withPort($port);
}
->withHost($target->getHost())
->withPort($target->getPort());

// Check for subdirectory.
if ($path = $target->getPath()) {
Expand Down

0 comments on commit 74bd607

Please sign in to comment.