In message <[email protected]>, Puneet writes:
>I want to stop the users accessing my website via IP address.
>I am using varnish as cache.
>I have the following code in place but it is not working.
>
>In vcl_recv() {
> if(req.url ~ "XX.XX.XXX.XXX") {
You should check the req.http.host header, that's where you will
find the IP# or hostname the user used.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[email protected] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc