Request restriction based on IP and url parameter

Anjali Maurya anjali.maurya01 at indiamart.com
Thu Oct 5 07:53:08 UTC 2023


Hi team,
We are trying to restrict unauthorized requests at varnish based on a
parameter and IP associated with the parameter. The parameter value is
present in the URL and the IP is present in the header. So, we want to know
if it is possible to implement this restriction based on parameter value
and associated IP.
We have different values and associated IPs.

For example:
URL: hostname:port/path?source=mobile&keyword= bags
There are 3 IPs associated with mobile source.
mobile: IP1, IP2, IP3

So if any request comes with mobile and IP4, that is an unauthorized
request and should be blocked at varnish.

Can we do this at varnish?

If yes, then which approach will be more appropriate handling this at the
varnish level or handling it using Java code at the API level?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20231005/378efcea/attachment.html>


More information about the varnish-misc mailing list