Literal ip4/6 addresses in VCL
slink at schokola.de
Sun Mar 7 15:23:38 CET 2010
>> My main question is if they should be tokenized as CSTRs or rather as new
>> tokens, e.g. of token type IP (not to be confused with variable type IP).
> The syntax for this is already decided, just not implemented:
> set client.ip = IP(req.http.x-forwarded-for);
Thank you for pointing this out, so I am going to implement this syntax for the
case where runtime conversion is needed.
Do you have an opinion regarding the suggestion for the VCL compile time case?
IOW, do you favor
set client.ip = [126.96.36.199];
set client.ip = "188.8.131.52";
or even no compile time support as in
set client.ip = IP("184.108.40.206");
More information about the varnish-dev