<div dir="auto"><div>Hi!</div><div dir="auto"><br></div><div dir="auto">It's completely possible, easy and recommended to do that at the varnish level (at least it you want to cache that content)</div><div dir="auto"><br></div><div dir="auto">How many ips are you actually allowing, are the actual ips or CIDR blocks?</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">It's definitely something I <br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, Oct 5, 2023, 09:55 Anjali Maurya <<a href="mailto:anjali.maurya01@indiamart.com" target="_blank" rel="noreferrer">anjali.maurya01@indiamart.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi team,<br>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. <br>We have different values and associated IPs.<div><br>For example:<br>URL: hostname:port/path?source=mobile&keyword= bags<br>There are 3 IPs associated with mobile source.<br>mobile: IP1, IP2, IP3</div><div><br>So if any request comes with mobile and IP4, that is an unauthorized request and should be blocked at varnish.</div><div><br>Can we do this at varnish?</div><div><br>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? <br></div></div>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" rel="noreferrer noreferrer" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div></div></div>