Saltar a contenido

$is_tablet

Indicates whether the request comes from a tablet device.

Type

boolean (1/0)

Possible values

  • 1 (true) - Request is from a tablet device.
  • 0 (false) - Request is not from a tablet device.

Example

map $is_tablet $tablet_cache {
    1 1;
    0 0;
}

server {
    location / {
        proxy_cache_key "$tablet_cache:$request_uri";
        proxy_set_header X-Device-Tablet $is_tablet;
        proxy_pass http://backend;
    }
}