Skip to content

Commit

Permalink
fix: Ignore uuid header if UUID env is empty or not set (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
arajkumar authored Nov 10, 2020
1 parent f14c662 commit 930023e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 930023e

Please sign in to comment.