diff options
Diffstat (limited to 'app/scripts/lib/createOriginMiddleware.js')
-rw-r--r-- | app/scripts/lib/createOriginMiddleware.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/scripts/lib/createOriginMiddleware.js b/app/scripts/lib/createOriginMiddleware.js new file mode 100644 index 000000000..e1e097cc4 --- /dev/null +++ b/app/scripts/lib/createOriginMiddleware.js @@ -0,0 +1,9 @@ +// append dapp origin domain to request +module.exports = createOriginMiddleware + +function createOriginMiddleware({ origin }) { + return function originMiddleware (req, res, next, end) { + req.origin = origin + next() + } +}
\ No newline at end of file |