Lua to change HTTP to HTTPS

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

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.