Custom variables

Hey folks.

I can’t find any information about setting custom variables in the
It seems to be possible, but is never mentioned in the documentation as
as I can tell. For example, here:

browsers.conf · GitHub

There are two places where variables are used and referenced. A series
statements like this:

ancient_browser msie 4.0;
ancient_browser msie 5.0;

Apparently compose an array that can be referenced like this:

if ($ancient_browser){ …

Then a statement like this:

set $unsupported_browser_rewrite perform;

Apparently can then be referenced like this:

if ($unsupported_browser_rewrite = perform)

Clearly the first case involves some specialized behavior regarding the
browser used by the request… but the grammar is really obtuse. Can
point me to the documentation that explains all this?