diff options
Diffstat (limited to 'src/vmod-basicauth.3')
-rw-r--r-- | src/vmod-basicauth.3 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vmod-basicauth.3 b/src/vmod-basicauth.3 index 91236f3..58e4331 100644 --- a/src/vmod-basicauth.3 +++ b/src/vmod-basicauth.3 @@ -13,7 +13,7 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with vmod-basicauth. If not, see <http://www.gnu.org/licenses/>. -.TH VMOD-BASICAUTH 1 "November 1, 2014" "VMOD-BASICAUTH" "User Reference" +.TH VMOD-BASICAUTH 1 "November 10, 2014" "VMOD-BASICAUTH" "User Reference" .SH NAME vmod-basicauth \- Basic HTTP authentication .SH SYNOPSIS @@ -40,13 +40,20 @@ supplies the name of the password file to use. The \fIauthstr\fR argument is the authentication string (normally, the value of the \fBAuthorization\fR HTTP header. .PP -.SS Example +.SS Example: VCL 3.0 .PP .EX if (!basicauth.match("/var/www/.htpasswd", req.http.Authorization)) { error 401 "Restricted"; } .EE +.SS Example: VCL 4.0 +.PP +.EX +if (!basicauth.match("/var/www/.htpasswd", req.http.Authorization)) { + return (synth(401, "Restricted")); +} +.EE .\" The MANCGI variable is set by man.cgi script on Ulysses. .\" The download.inc file contains the default DOWNLOAD section .\" for man-based doc pages. |