Varnish cache: how to detect IPv6

The following VCL code detects if the client is connected using IPv6:

acl isipv6{                     
sub vcl_recv {          
    # [... whatever rules you like ...]
    if(server.ip ~ isipv6){
        # [... whatever rules you like ...]
    # [... whatever rules you like ...]

You may want to use that for example for a "you're ipv6 enabled" banner.

© GeekLabInfo Varnish cache: how to detect IPv6 is a post from You are free to copy materials from, but you are required to link back to
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *