Skip to content

Commit

Permalink
Merge pull request #2 from langleyfoxall/fix/double-api-on-base-uri
Browse files Browse the repository at this point in the history
Allow for /api to be present in base URI
  • Loading branch information
Gregory Mayes authored Aug 12, 2020
2 parents 0705e82 + f574464 commit da42b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ protected function url()
$baseUri = substr($baseUri, strlen($baseUri) - 1) === '/' ? substr($baseUri, 0, -1) : $baseUri;

// Add suffix
$baseUri = substr($baseUri, strlen($baseUri) - 1) !== '/api' ? $baseUri . '/api' : $baseUri;
$baseUri = substr($baseUri, strlen($baseUri) - 4) !== '/api' ? $baseUri . '/api' : $baseUri;

return $baseUri . $endpoint;
}
Expand Down

0 comments on commit da42b58

Please sign in to comment.