diff --git a/audit-resolve.json b/audit-resolve.json index e69de29b..07450e07 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -0,0 +1,76 @@ +{ + "decisions": { + "1523|@mojaloop/central-services-error-handling>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>@mojaloop/central-services-error-handling>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-logger>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>@mojaloop/central-services-logger>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>@mojaloop/event-sdk>@mojaloop/central-services-logger>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/event-sdk>@mojaloop/central-services-logger>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>@mojaloop/event-sdk>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/event-sdk>winston>async>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>@mojaloop/event-sdk>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/event-sdk>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>openapi-backend>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|@mojaloop/central-services-shared>openapi-backend>mock-json-schema>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + }, + "1523|knex>lodash": { + "decision": "ignore", + "madeAt": 1593690759717, + "expiresAt": 1594295539291 + } + }, + "rules": {}, + "version": 1 +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6302f4e4..63449df2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "quoting-service", - "version": "10.5.1", + "version": "10.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fe551020..a4e2719a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "quoting-service", "description": "Quoting Service hosted by a scheme", "license": "Apache-2.0", - "version": "10.5.1", + "version": "10.5.2", "author": "ModusBox", "contributors": [ "James Bush ", diff --git a/src/model/quotes.js b/src/model/quotes.js index 4c4a3b4f..f6eb651d 100644 --- a/src/model/quotes.js +++ b/src/model/quotes.js @@ -1108,7 +1108,7 @@ class QuotesModel { */ generateRequestHeaders (headers, noAccept) { const ret = { - 'Content-Type': 'application/vnd.interoperability.quotes+json;version=1.0', + 'Content-Type': headers['content-type'] || headers['Content-Type'], Date: headers.date, 'FSPIOP-Source': headers['fspiop-source'], 'FSPIOP-Destination': headers['fspiop-destination'], @@ -1119,7 +1119,7 @@ class QuotesModel { } if (!noAccept) { - ret.Accept = 'application/vnd.interoperability.quotes+json;version=1' + ret.Accept = headers.accept || headers.Accept } return this.removeEmptyKeys(ret) @@ -1132,7 +1132,7 @@ class QuotesModel { */ generateRequestHeadersForJWS (headers, noAccept) { const ret = { - 'Content-Type': 'application/vnd.interoperability.quotes+json;version=1.0', + 'Content-Type': headers['content-type'] || headers['Content-Type'], date: headers.date, 'fspiop-source': headers['fspiop-source'], 'fspiop-destination': headers['fspiop-destination'], @@ -1143,7 +1143,7 @@ class QuotesModel { } if (!noAccept) { - ret.Accept = 'application/vnd.interoperability.quotes+json;version=1' + ret.Accept = headers.accept || headers.Accept } return this.removeEmptyKeys(ret) diff --git a/test/unit/model/quotes.test.js b/test/unit/model/quotes.test.js index 63a652b5..ff06a83b 100644 --- a/test/unit/model/quotes.test.js +++ b/test/unit/model/quotes.test.js @@ -145,6 +145,8 @@ describe('QuotesModel', () => { longitude: '23.32415' }, headers: { + Accept: 'application/vnd.interoperability.quotes+json;version=1.0', + 'Content-Type': 'application/vnd.interoperability.quotes+json;version=1.0', 'fspiop-source': 'dfsp1', 'fspiop-destination': 'dfsp2' }, @@ -2493,7 +2495,7 @@ describe('QuotesModel', () => { it('generates default request headers, including the Accept', () => { // Arrange const expected = { - Accept: 'application/vnd.interoperability.quotes+json;version=1', + Accept: 'application/vnd.interoperability.quotes+json;version=1.0', 'Content-Type': 'application/vnd.interoperability.quotes+json;version=1.0', 'FSPIOP-Destination': 'dfsp2', 'FSPIOP-Source': 'dfsp1' @@ -2532,7 +2534,7 @@ describe('QuotesModel', () => { it('generates default request headers, including the Accept', () => { // Arrange const expected = { - Accept: 'application/vnd.interoperability.quotes+json;version=1', + Accept: 'application/vnd.interoperability.quotes+json;version=1.0', 'Content-Type': 'application/vnd.interoperability.quotes+json;version=1.0', 'fspiop-destination': 'dfsp2', 'fspiop-source': 'dfsp1'