# HTML filter for javascript injection

**URL:** <https://community.traefik.io/t/html-filter-for-javascript-injection/7707>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [September 15, 2020, 8:21am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707 "2020-09-15T08:21:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/florian/32/3037_2.png) [@florian](https://community.traefik.io/u/florian)\
**Post date:** [September 15, 2020, 8:21am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707/1 "2020-09-15T08:21:22Z")

</div>

Hello,

I'm looking for an HTML filter as the one written for Nginx : [ngx\_http\_sub\_module](http://nginx.org/en/docs/http/ngx_http_sub_module.html)

The goal here is to inject javascript in the Traefik response

Is there any middleware available for that ?  
Florian

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [September 15, 2020, 8:29am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707/2 "2020-09-15T08:29:47Z")

</div>

You can find the list of available middleware for traefik on the [documentation site](https://docs.traefik.io/middlewares/overview/), look at the sidebar on the left.

---

<div class="post-metadata">

**Author:** ![florian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/florian/32/3037_2.png) [@florian](https://community.traefik.io/u/florian)\
**Post date:** [September 15, 2020, 8:43am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707/3 "2020-09-15T08:43:04Z")

</div>

From what I have seen, there is no middlewares available for that, did I miss something ?

I found that Traefik 2.3 can handle plugins, and the plugin [rewrite body](https://github.com/containous/plugin-rewritebody) could solve my issue. However the docs says that this is only available through Traefik Pilot Saas software.

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [September 15, 2020, 10:00am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707/4 "2020-09-15T10:00:40Z")

</div>

> From what I have seen, there is no middlewares available for that, did I miss something ?

Probably not.

> I found that Traefik 2.3 can handle plugins, and the plugin [rewrite body](https://github.com/containous/plugin-rewritebody) could solve my issue. However the docs says that this is only available through Traefik Pilot Saas software.

Sounds right.

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [September 15, 2020, 11:56am UTC](https://community.traefik.io/t/html-filter-for-javascript-injection/7707/5 "2020-09-15T11:56:08Z")

</div>

> [@florian](#):
>
> However the docs says that this is only available through Traefik Pilot Saas software.

The plugins are available in Traefik (OSS) through Traefik Pilot (the plugins registry)
