|
|
@ -39,7 +39,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
this.app.use(function(req, res, next) { |
|
|
|
res.setHeader('Access-Control-Allow-Origin', '*'); |
|
|
|
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, DELETE'); |
|
|
|
res.setHeader('Access-Control-Allow-Headers', 'x-signature,x-identity,x-session,x-client-version,X-Requested-With,Content-Type,Authorization'); |
|
|
|
res.setHeader('Access-Control-Allow-Headers', 'x-signature,x-identity,x-session,x-client-version,x-wallet-id,X-Requested-With,Content-Type,Authorization'); |
|
|
|
res.setHeader('x-service-version', WalletService.getServiceVersion()); |
|
|
|
next(); |
|
|
|
}); |
|
|
@ -165,6 +165,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
message: req.method.toLowerCase() + '|' + req.url + '|' + JSON.stringify(req.body), |
|
|
|
signature: credentials.signature, |
|
|
|
clientVersion: req.header('x-client-version'), |
|
|
|
walletId: req.header('x-wallet-id'), |
|
|
|
}; |
|
|
|
if (opts.allowSession) { |
|
|
|
auth.session = credentials.session; |
|
|
|