diff --git a/README.md b/README.md index 71dccfc0..c8b5f644 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Dependency Analytics LSP Server [![NPM Publish](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/badge/icon)](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/) -[![codecov](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server/branch/master/graph/badge.svg?token=aVThXjheDf)](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server) +[![NPM Version](https://img.shields.io/npm/v/fabric8-analytics-lsp-server.svg)](https://www.npmjs.com/package/fabric8-analytics-lsp-server) ![CI Build](https://github.com/fabric8-analytics/fabric8-analytics-lsp-server/workflows/CI%20Build/badge.svg) - +[![codecov](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server/branch/master/graph/badge.svg?token=aVThXjheDf)](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server) Language Server(LSP) that can analyze your dependencies specified in `package.json` and `pom.xml`. ## Build diff --git a/src/server.ts b/src/server.ts index 89ad162b..7e608ca4 100644 --- a/src/server.ts +++ b/src/server.ts @@ -210,8 +210,10 @@ const fetchVulnerabilities = async (reqData) => { const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + config.api_token, - 'uuid': config.uuid, }; + if (config.uuid) { + headers['uuid'] = config.uuid; + } try { const response = await fetch(url , { method: 'post',