# Injecting JS into HTMLs platform wide

**URL:** <https://discuss.openedx.org/t/injecting-js-into-htmls-platform-wide/18784>\
**Category:** Site Operators\
**Created:** [April 13, 2026, 9:16am UTC](https://discuss.openedx.org/t/injecting-js-into-htmls-platform-wide/18784 "2026-04-13T09:16:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mboisson](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mboisson/32/7551_2.png) [@mboisson](https://discuss.openedx.org/u/mboisson)\
**Post date:** [April 14, 2026, 5:46pm UTC](https://discuss.openedx.org/t/injecting-js-into-htmls-platform-wide/18784/6 "2026-04-14T17:46:43Z")

</div>

I would be interested to learn more about the Caddyfile option, as we already modify the caddy file with a patch:

> [@Is there an easy way to add a robots.txt to a tutor-based OpenEdX deployment?](https://discuss.openedx.org/t/is-there-an-easy-way-to-add-a-robots-txt-to-a-tutor-based-openedx-deployment/15259/19):
>
> Talking with my colleague who knows more about Caddy, I realised it should be possible to do with this instead, which does not require adding a file to the caddy container from tutor import hooks hooks.Filters.ENV\_PATCHES.add\_item( ( "caddyfile-cms", """ # Serve robots.txt respond /robots.txt 200 { body "User-agent: \* Disallow: /" close } """ ) ) hooks.Filters.ENV\_PATCHES.add\_item( ( "caddyfile-lms", """ # Serve robots.txt respond /…

Maybe it is possible to inject your change with the same kind of hook ?

---

_[View the full topic](https://discuss.openedx.org/t/injecting-js-into-htmls-platform-wide/18784)._
