diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-09-15 10:40:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 10:40:00 +0800 |
commit | 693655e2da7cacf5a5326b50bddc37bcece9422e (patch) | |
tree | f5f6c429649af579d97eaa5940cab94dbc365a29 /app/scripts/lib/createOriginMiddleware.js | |
parent | 1d3cd9768cdd372d02e7e34674dde9d86af536f5 (diff) | |
parent | 0687c822baf7dcde8e96afa25ebc84491a061d07 (diff) | |
download | tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.gz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.bz2 tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.lz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.xz tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.tar.zst tangerine-wallet-browser-693655e2da7cacf5a5326b50bddc37bcece9422e.zip |
Merge pull request #2070 from MetaMask/filter-leak-fix3
Memory leak fixes - stream and filter life cycles
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 |