Skip to content

$os_family

The $os_family variable provides the operating system family of the client making the request.

Type

string

Possible values

  • Windows
  • Android
  • Unix
  • iOS
  • macOS

Example

Here is an example of using the $os_family variable in a proxy_set_header directive to pass the OS family to a backend service:

location /api {
    proxy_pass http://backend;
    proxy_set_header X-OS-Family $os_family;
}