- https://mitmproxy.org/
- ./mitmweb -p 8888
- elastic/elasticsearch-js#101
- npm install proxy-agent
Last active
December 21, 2017 01:12
-
-
Save larryyangsen/c2c8f4ba656ce67693573f8c603cc2e1 to your computer and use it in GitHub Desktop.
nodejs elasticsearch.js detect http request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import elasticsearch from 'elasticsearch'; | |
| import config from '../config'; | |
| import proxy from 'proxy-agent'; | |
| const client = new elasticsearch.Client({ | |
| host: 'my.host.com', | |
| createNodeAgent: () => proxy("http://localhost:8888") | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment