Skip to content

Instantly share code, notes, and snippets.

View nntoan's full-sized avatar
🌀

Toan Nguyen nntoan

🌀
View GitHub Profile
@nntoan
nntoan / Varnish VCL Basic Authentication.md
Created August 1, 2021 13:11 — forked from Integralist/Varnish VCL Basic Authentication.md
[Varnish VCL Basic Authentication] #security #basicauth #authentication #vcl #varnish #fastly #cdn

generate a username/password

echo -n beep:boop | base64

YmVlcDpib29w

Note: it's important to use -n otherwise echo will add a line break and that can be a time consuming error to debug when you find your username/password isn't working ;-) if you do find you need to debug, then use curl with the -v flag and inspect the request headers being sent and make sure your base64 encoded username/password matches what curl generates for the Authorization header when using the --user flag (see below curl examples)