Skip to content

Commit

Permalink
Merge pull request #332 from Senyoret1/url
Browse files Browse the repository at this point in the history
Sanitize the URLs used by the manager
  • Loading branch information
jdknives authored Apr 20, 2020
2 parents c78280e + c5fc34d commit 8cb08a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions static/skywire-manager-src/src/app/services/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export class ApiService {
body = body ? body : {};
options = options ? options : new RequestOptions();

// Sanitize the URL.
if (url.startsWith('/')) {
url = url.substr(1, url.length - 1);
}

return this.http.request(method, this.apiPrefix + url, {
...this.getRequestOptions(options),
responseType: options.responseType,
Expand Down

0 comments on commit 8cb08a6

Please sign in to comment.