Varnish Variable for Decoded req.http.Authorization

Guillaume Quintard guillaume at varnish-software.com
Wed Oct 19 18:54:32 CEST 2016


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" <kelvin1111111 at gmail.com> wrote:

> 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
> there is a default variable that I can use in Varnish VCL.
>
> Thanks!
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20161019/6dc375c2/attachment.html>


More information about the varnish-misc mailing list