-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(FEC-10161): add kava analytics url from server response #82
Conversation
Issue: kava reports to production env instead QA Solution: add service path to configured serviceUrl and set the protocol.
src/kava.js
Outdated
@@ -70,6 +71,7 @@ class Kava extends BasePlugin { | |||
super(name, player, config); | |||
this._rateHandler = new KavaRateHandler(); | |||
this._model = new KavaModel(); | |||
this._serviceUrl = Utils.Http.protocol + '//' + this.config.serviceUrl.replace(/(^\w+:|^)\/\//, '') + SERVICE_PATH; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use template strings since its much more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why force the protocol? we assume that a working path is given and nobody promises that SERVICE_PATH is required.
Config should allow getting a fully functional URL as the service url can be proxied by another service fr example in an onPrem env.
The default protocol can be left // so we get the one the page has
src/kava.js
Outdated
@@ -70,6 +71,7 @@ class Kava extends BasePlugin { | |||
super(name, player, config); | |||
this._rateHandler = new KavaRateHandler(); | |||
this._model = new KavaModel(); | |||
this._serviceUrl = Utils.Http.protocol + '//' + this.config.serviceUrl.replace(/(^\w+:|^)\/\//, '') + SERVICE_PATH; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why force the protocol? we assume that a working path is given and nobody promises that SERVICE_PATH is required.
Config should allow getting a fully functional URL as the service url can be proxied by another service fr example in an onPrem env.
The default protocol can be left // so we get the one the page has
@OrenMe it's our Kava analytics you can't set there URL for another analytics service. |
the plugin config should be explicit - it refers to a url, not partial. |
Description of the Changes
Issue: kava reports to production env instead QA
Solution: add service protocol for default only.
CheckLists