Skip to content

Commit a91d74f

Browse files
committed
fix: trim url
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 168c556 commit a91d74f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/apps/automatic_projects_discovery_worker/src/sources/lf-criticality-score

services/apps/automatic_projects_discovery_worker/src/sources/lf-criticality-score/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function getApiBaseUrl(): string {
3838
if (process.env.LF_CRITICALITY_SCORE_API_URL) {
3939
return process.env.LF_CRITICALITY_SCORE_API_URL.replace(/\/$/, '')
4040
}
41-
const host = (process.env.LF_CRITICALITY_SCORE_API_HOST ?? DEFAULT_API_HOST).replace(/\/$/, '')
41+
const host = (process.env.LF_CRITICALITY_SCORE_API_HOST ?? DEFAULT_API_HOST).trim().replace(/\/$/, '')
4242
const port = parseInt(process.env.LF_CRITICALITY_SCORE_API_PORT ?? String(DEFAULT_API_PORT), 10)
4343
const scheme = port === 443 ? 'https' : 'http'
4444
return `${scheme}://${host}:${port}`

0 commit comments

Comments
 (0)