Skip to content

Commit 0f44f8b

Browse files
vahepbhovhannes
vahep
authored andcommitted
feat: add option usePath to allow using host path in api
1 parent ca1b714 commit 0f44f8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/streamApiServiceProvider.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ function streamApiServiceFactory($http, $httpParamSerializer, $q) {
5555
}
5656

5757
var parsedUrl = new Url(config.host);
58-
config.host = parsedUrl.protocol + '//' + parsedUrl.host;
58+
if (config.usePath) {
59+
config.host = parsedUrl.protocol + '//' + parsedUrl.host + parsedUrl.pathname;
60+
} else {
61+
config.host = parsedUrl.protocol + '//' + parsedUrl.host;
62+
}
5963

6064
if(requestNewInstance) {
6165
return new Api(config);

0 commit comments

Comments
 (0)