-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify Request Body / Response Body Before Sending To Server Or Client #2564
Comments
Maybe Lua filters could help you to achieve that: https://www.arpalert.org/src/haproxy-lua-api/3.0/index.html#filter-class If you need assistance about this feature, I suggest you to have a look at existing github issues (lua filters related, e.g: #2517) or ask for help on mailing list or on the community forum as github issue are normally meant for tracking bugs and feature requests. |
As @Darlelet said, Lua filters are the only way to do it. I'm closing because it is not a feature request or a bug. |
Detailed Description of the Problem
I would like to use a LUA script to modify the request body of the incoming HTTP request before submitting it to my backend and then I want to use a LUA script to modify the response body from the backend before sending it back to the client. Is something like this possible? I can see that I am able to use an action in LUA and the TXN class to modify items, but I can't seem to be able to get the changed values into HAProxy before submitting the request to the server or the client.
I am using HAProxy 2.6.5 at the moment.
Expected Behavior
Having a LUA script or HAProxy configuration to modify request body or response body before submitting to server or back to client
Steps to Reproduce the Behavior
No steps at this stage.
Do you have any idea what may have caused this?
No response
Do you have an idea how to solve the issue?
No response
What is your configuration?
Output of
haproxy -vv
Last Outputs and Backtraces
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: