diff --git a/lib/http-server/http-server.js b/lib/http-server/http-server.js index a384f9f..3baf71c 100644 --- a/lib/http-server/http-server.js +++ b/lib/http-server/http-server.js @@ -9,7 +9,9 @@ const sirv = require('sirv') const helmet = require('helmet') const nocache = require('nocache') const Logger = require('../logger') -const errors = require('../errors'); +const errors = require('../errors') +const network = require("../../lib/bitcoin/network") +const keys = require('../../keys')[network.key] /** @@ -57,6 +59,11 @@ class HttpServer { this.app.use('/static', sirv('../static')); + this.app.use((req, res, next) => { + res.append('X-Dojo-Version', keys.dojoVersion) + next() + }) + this.app.use(HttpServer.setJSONResponse) this.app.use(HttpServer.setConnection) }