mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Sanitize service endpoint by adding/reving slash when needed. (#1821)
* Sanitize service endpoint by adding/reving slash when needed.
This commit is contained in:
parent
1f4e4336dd
commit
b060bc153f
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user