Re: Varnish Variable for Decoded req.http.Authorization

2016-10-19 Thread Kelvin Loke
> > Hi Kelvin, > > It's actually pretty simple to do: use a regex to get the second word, > then use vmod-var to decode the token. > I did check vmod-var, I couldn't find any usage/manual about the base64 decode function. Do you mean the libvmod-digest? Cheers.

Re: Varnish Variable for Decoded req.http.Authorization

2016-10-19 Thread Guillaume Quintard
Hi Kelvin, It's actually pretty simple to do: use a regex to get the second word, then use vmod-var to decode the token. On Oct 19, 2016 12:15, "Kelvin Loke" wrote: > Good day everyday, I have a question about req.http.Authorization. > As req.http.Authorization is at

Varnish Variable for Decoded req.http.Authorization

2016-10-19 Thread Kelvin Loke
Good day everyday, I have a question about req.http.Authorization. As req.http.Authorization is at the format of "Basic Uk1CVTUweWMjIyMg==", do we have any variable for the base64 decoded value from req.http.Authorization? I knew that Varnishncsa has %u for this purpose, it would be great if

Re: Different host headers - same cache?

2016-10-19 Thread Andrei
Out of curiosity, how expensive is it to use std.strstr()? Would it even have any sort of noticeable performance impact or just a slightly elevated cpu time for somewhat elevated traffic (~25k req/s)? On Mon, Oct 17, 2016 at 6:22 PM, Frederik Ramm wrote: > Hi, > > On