AddUserHeader

Minimum version required

The features described on this page require EZproxy 3.6c GA (2006-03-10) or later.

Overview

AddUserHeader is a position-dependent config.txt/ezproxy.cfg directive that interacts with database definitions.

AddUserHeader directs EZproxy to include a header containing the current user's username when proxying to a database.

The complete syntax is:

AddUserHeader -base64 headername

-base64 is an optional qualifier to indicate that the username should be encoded in base64. headername specifies the name of the header that should be used when sending the username. Omit both -base64 and headername to direct EZproxy not to include this header for the databases that follow.

Examples

This directive is position-dependent, allowing its use to vary by database. In the following example, Some Database receives the X-User header, Other Database and Another Database receive the X-Username header with base64 encoding, and Yet Another Database and databases that follow it do not receive any header at all.

AddUserHeader X-User
Title Some Database
URL http://www.somedb.com
Domain somedb.com
AddUserHeader -base64 X-Username
Title Other Database
URL http://www.otherdb.com
Domain otherdb.com
Title Another Databse
URL http://www.anotherdb.com
Domain anotherdb.com
AddUserHeader
Title Yet Another Database
URL http://yanotherdb.com
Domain yanotherdb.com