Browse Source

Send Dojo version in HTTP header field

Pavel Ševčík 3 years ago
parent
commit
d28e487720
No known key found for this signature in database GPG Key ID: CFA54E4C0CD58DF0
  1. 9
      lib/http-server/http-server.js

9
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)
}

Loading…
Cancel
Save