Hi
I wonder if it would be possible to modify a HTTP POST in HAProxy with or
without lua?
I'm planning on placing an API behind HAProxy and want a way to modify the
times/intervals in the POST data to increase cacheability to the API.
For example if a post contains 2020-05-27T14:31:13.173, I would want to
rewrite it so that seconds and sub-seconds are rounded down to 0. Also I
would like to round down or up time to 5 minute intervals, so the end
result would be 2020-05-27T14:30:00.000.
For instance, this POST
{"interval":"2020-05-27T14:31:13.173+02:00/2020-05-27T18:31:13.173+02:00"}
would be rewritten into this before hitting the backend and haproxy cache.
{"interval":"2020-05-27T14:30:00.000+02:00/2020-05-27T18:30:00.000+02:00"}
Any advice or pointers would be appreciated.
Thanks,
Elias