Skip to content

Commit

Permalink
Merge pull request #80 from CommonGateway/feature/XZ-162/url-fix
Browse files Browse the repository at this point in the history
Unset last / from baseUrl
  • Loading branch information
smisidjan authored Sep 19, 2023
2 parents 789beda + 1adc927 commit 9986804
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Service/DRCService.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ public function drcReleaseHandler(array $data, array $configuration): array
*/
private function generateDownloadEndpoint(string $id, Endpoint $downloadEndpoint): string
{
$baseUrl = $this->parameterBag->get('app_url');
// Unset the last / from the app_url.
$baseUrl = rtrim($this->parameterBag->get('app_url'), '/');

$pathArray = $downloadEndpoint->getPath();
foreach ($pathArray as $key => $value) {
if ($value == 'id' || $value == '[id]' || $value == '{id}') {
Expand Down

0 comments on commit 9986804

Please sign in to comment.