From 64b6e99f7ea8f8606b105d69520128d518c8fc42 Mon Sep 17 00:00:00 2001 From: Diana Barsan Date: Wed, 6 Nov 2024 21:01:40 +0200 Subject: [PATCH] change header name, this is no longer a uuid Signed-off-by: Diana Barsan --- api/src/server-utils.js | 2 +- api/tests/mocha/db.spec.js | 2 +- api/tests/mocha/server-utils.spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/server-utils.js b/api/src/server-utils.js index dcafa55e45..d9f7d48c44 100644 --- a/api/src/server-utils.js +++ b/api/src/server-utils.js @@ -4,7 +4,7 @@ const environment = require('@medic/environment'); const isClientHuman = require('./is-client-human'); const logger = require('@medic/logger'); const MEDIC_BASIC_AUTH = 'Basic realm="Medic Web Services"'; -const REQUEST_ID_HEADER = 'X-Request-UUID'; +const REQUEST_ID_HEADER = 'X-Request-Id'; const cookie = require('./services/cookie'); const {InvalidArgumentError} = require('@medic/cht-datasource'); diff --git a/api/tests/mocha/db.spec.js b/api/tests/mocha/db.spec.js index 0d81e94f1a..df4ba94038 100644 --- a/api/tests/mocha/db.spec.js +++ b/api/tests/mocha/db.spec.js @@ -421,7 +421,7 @@ describe('db', () => { expect(headers.length).to.equal(4); headers.forEach((header) => { expect(header.get('X-Medic-Service')).to.equal('api'); - expect(header.get('X-Request-UUID')).to.equal('the_id'); + expect(header.get('X-Request-Id')).to.equal('the_id'); }); }); diff --git a/api/tests/mocha/server-utils.spec.js b/api/tests/mocha/server-utils.spec.js index 1b03fc1a13..8618ab0de2 100644 --- a/api/tests/mocha/server-utils.spec.js +++ b/api/tests/mocha/server-utils.spec.js @@ -284,6 +284,6 @@ describe('Server utils', () => { }); it('should export request header', () => { - chai.expect(serverUtils.REQUEST_ID_HEADER).to.equal('X-Request-UUID'); + chai.expect(serverUtils.REQUEST_ID_HEADER).to.equal('X-Request-Id'); }); });