# Lua to change HTTP to HTTPS

**URL:** <https://discourse.haproxy.org/t/lua-to-change-http-to-https/361>\
**Category:** Lua Scripts\
**Created:** [June 6, 2016, 4:34pm UTC](https://discourse.haproxy.org/t/lua-to-change-http-to-https/361 "2016-06-06T16:34:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![melaleuca](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@melaleuca](https://discourse.haproxy.org/u/melaleuca)\
**Post date:** [June 6, 2016, 4:34pm UTC](https://discourse.haproxy.org/t/lua-to-change-http-to-https/361/1 "2016-06-06T16:34:39Z")

</div>

Is it possible to modify the HTTP content using lua? Would like to change all http to https on the fly.

---

<div class="post-metadata">

**Author:** ![thierry](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@thierry](https://discourse.haproxy.org/u/thierry)\
**Post date:** [September 10, 2016, 10:58am UTC](https://discourse.haproxy.org/t/lua-to-change-http-to-https/361/2 "2016-09-10T10:58:54Z")

</div>

No, you can’t because a modification of the HTTP content break the synchronization with haproxy internal counters and buffers.

Maybe in a future version.
