Change haproxy response body content

I have a scenario, where I have a javascript content which needs to be inserted to the response body. I am using lua script to register an action for the response. But I am not finding any ways to modify the response body. Please let me know, if any resolutions for my problem.

Thanks,
Anand