Welcome! Log In Create A New Profile

Advanced

Transform POST request to GET and pass body in URL

Kip Coul
March 26, 2015 08:14AM
Hello,

I am using Varnish as a cache and reverse-proxy to distribute requests
between different backend workers. The workers expect some parameters,
that can be passed either through GET or POST.

The way Varnish works is by caching and distributing requests based on
the URL. So all GET requests are fine, because the parameters are in
the URL.

However, POST requests are not, because parameters are within the
body, so requests are not cached and distributed to one backend worker
only, which then gets all the load.

What I'd like to do is transform POST requests to GET requests, by
encoding the POST body content in the URL and pass a subsequent GET to
the Varnish cache.

Do you think this is possible? If so, how?

Many thanks for your help!

Regards,
Kip

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Transform POST request to GET and pass body in URL

Kip Coul March 26, 2015 08:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 227
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready