HTTP variables

$upstream_cookie_* variable family (HTTP)

Access a named response cookie from the last backend response. This is not a request cookie or authenticated identity. Version: 1.7.1. Use a concrete synthetic cookie name; never log session cookies. No positional arguments. Example: partial http configuration for a disposable synthetic lab; not a complete deployment.

Formal Syntax & Structure

nginx syntaxnginx
$upstream_cookie_*

Working Example

Example Snippetnginx
# Classify presence without emitting raw backend metadata.map $upstream_cookie_lab_marker $lab_seen_upstream_cookie_lab_marker {    "" absent;    default present;}
Nginx Reference