Http post request during session

i would like to know by what method could i insert post request during the same session to bypass a form.

I seen lua but it seems to me the request is not in the same session.

Any ideas?

I don’t really understand what you try to achieve. Do you want to fill a form returned by a server from HAProxy, by sending back a POST request to this server ?

It is probably good to explain your needs to have a better overview without trying to a solution. What is your use-case ?

Yes exactly,

I go to a website which redirects me to authenticate, then I am redirected to this site but I have a form to validate access.
I want to override this form.
So I would like to initiate a post via haproxy as if it were the user.

Thanks if you have any ideas.

So you want to handle the authentication on HAProxy side without disturbing the user. I don’t see any way to achieve that out-of-the-box. I guess it is possible with a lua filter but it is hard to be sure this will work. It is highly dependent on how your app is working. But, you must hijack the original request instead, not the redirect response. Using a SPOE agent is probably also possible. At the end both solutions are not so easy to implement.

step 1,2,5 and 6 pass by Haproxy.

Step 6 i’s the response containing Form to fullfill, it’s not an authentication.

I think, i will use a filter to add javascript content in response page.

Thank for your help.