# How to intercept http requests using a plugin

**URL:** <https://discuss.elastic.co/t/how-to-intercept-http-requests-using-a-plugin/234907>\
**Category:** Elasticsearch\
**Created:** [May 29, 2020, 11:05am UTC](https://discuss.elastic.co/t/how-to-intercept-http-requests-using-a-plugin/234907 "2020-05-29T11:05:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulkarajgikar](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rahulkarajgikar](https://discuss.elastic.co/u/rahulkarajgikar)\
**Post date:** [May 29, 2020, 11:05am UTC](https://discuss.elastic.co/t/how-to-intercept-http-requests-using-a-plugin/234907/1 "2020-05-29T11:05:08Z")

</div>

Hi,

I want to intercept all http requests, to allow some endpoints and disallow other endpoints using a plugin. This plugin should also be able to modify the response being sent back to the users. How could I implement a plugin like this, should it be a NetworkPlugin? I tried using a Transport Interceptor but wasn't able to use that to obtain the http request.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2020, 11:05am UTC](https://discuss.elastic.co/t/how-to-intercept-http-requests-using-a-plugin/234907/2 "2020-06-26T11:05:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
