I am currently working on a project based on varnish..
we write vcl and vmod. But the project need check the request body. Buddies, How can I get request body in VCL or vmod with a C function? Help Needed.
I am currently working on a project based on varnish..
we write vcl and vmod. But the project need check the request body. Buddies, How can I get request body in VCL or vmod with a C function? Help Needed.
TL;DR;
I think this answer is what you need: https://stackoverflow.com/a/12181364/1016425
As mentioned previously by @AndreasM Varnish does not cache POST request by default. But this can be changed if you want.
If you need to cache POST request, this is possible and basically you need to make use of:
bodyaccess.hash_req_body();
This tutorial has a very good step by step explanation: https://docs.varnish-software.com/tutorials/caching-post-requests/
Varnish does not operate on POST requests, just passes them through.