- Updating Device Data
- Web Apps
- Reference Pages
- Useful Links
- Supported Versions
Configuring the Nginx API
Before you start matching user agents, you may wish to configure the solution to use a different database for example, or to use caching.
General Settings - These settings are valid in the main configuration block and should only be set once.
|Sets the location of the data file.
|Sets the size of the workset cache (Only relevant for pattern installation).
Location Settings - These settings are valid in the location configuration block and any number can be set.
|Gets device properties using a User-Agent. Takes the name the resultant header will be set as, and a comma separated list of properties to return.
|Gets device properties using multiple HTTP headers. Takes the name the resultant header will be set as, and a comma separated list of properties to return.
Below is an example config file showing how to load a Patter data file from a non default location, set the cache size, and set some device properties using the "51D_single" and "51D_all" directives. Some commonly used properties are set as request headers, some as a list and some as single headers. They are also set as response headers with the "add_header" directive to make it possible to see how the matching works without having a full website set up.