Skip to content

Commit

Permalink
Sanitize service endpoint by adding/reving slash when needed. (#1821)
Browse files Browse the repository at this point in the history
* Sanitize service endpoint by adding/reving slash when needed.
  • Loading branch information
mariacarmina authored Jun 25, 2024
1 parent 1f4e433 commit b060bc1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/Provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export class Provider {
const endpoint: ServiceEndpoint = {
serviceName: i,
method: endpoints.serviceEndpoints[i][0],
urlPath: providerEndpoint + endpoints.serviceEndpoints[i][1]
urlPath:
providerEndpoint.replace(/\/+$/, '') +
'/' +
endpoints.serviceEndpoints[i][1].replace(/^\/+/, '')
}
serviceEndpoints.push(endpoint)
}
Expand Down

0 comments on commit b060bc1

Please sign in to comment.