Skip to content

Commit

Permalink
add config option for webcompat reporter API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
antonok-edm committed Nov 12, 2019
1 parent caa93b4 commit 0268a0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const Config = function () {
this.braveServicesKey = getNPMConfig(['brave_services_key']) || ''
this.infuraProjectId = getNPMConfig(['brave_infura_project_id']) || ''
this.safeBrowsingApiEndpoint = getNPMConfig(['safe_browsing_api_endpoint']) || 'safebrowsing.brave.com'
this.webcompatReportApiEndpoint = getNPMConfig(['webcompat_report_api_endpoint']) || 'https://webcompat.brave.com/1/webcompat'
this.buildProjects()
this.braveVersion = getNPMConfig(['version']) || '0.0.0.0'
this.chromeVersion = getNPMConfig(['projects', 'chrome', 'tag']) || '0.0.0.0'
Expand Down Expand Up @@ -124,6 +125,7 @@ Config.prototype.buildArgs = function () {
chrome_version_string: this.chromeVersion,
chrome_version_major: chrome_version_parts[0],
safebrowsing_api_endpoint: this.safeBrowsingApiEndpoint,
webcompat_report_api_endpoint: this.webcompatReportApiEndpoint,
brave_referrals_api_key: this.braveReferralsApiKey,
enable_hangout_services_extension: this.enable_hangout_services_extension,
enable_cdm_host_verification: this.brave_enable_cdm_host_verification,
Expand Down Expand Up @@ -385,6 +387,10 @@ Config.prototype.update = function (options) {
this.safeBrowsingApiEndpoint = options.safebrowsing_api_endpoint
}

if (options.webcompat_report_api_endpoint) {
this.webcompatReportApiEndpoint = options.webcompat_report_api_endpoint
}

if (options.brave_referrals_api_key) {
this.braveReferralsApiKey = options.brave_referrals_api_key
}
Expand Down

0 comments on commit 0268a0b

Please sign in to comment.