Перейти к содержанию

$is_tv

Indicates whether the request comes from a Smart TV.

Type

boolean (1/0)

Possible values

  • 1 (true) - Request is from a Smart TV.
  • 0 (false) - Request is not from a Smart TV.

Example

map $is_tv $tv_cache {
    default 0;
    1      1;
}

server {
    location / {
        proxy_cache_key "$scheme$request_method$host$request_uri$is_tv";
        proxy_set_header X-Device-Type $is_tv;
        proxy_pass http://backend;
    }
}