Skip to main content

Proxies and load-balancing

Performance and Security

Deskpro has a proxy mode which tells it to trust IP addresses forwarded in HTTP headers.

You should enable proxy mode in these cases:

  • Your network configuration requires that you access Deskpro through proxy servers.
  • You are running Deskpro on multiple load-balanced nodes to increase availability.

To enable proxy mode, in the Deskpro config.php edit the following line:

$DP_CONFIG['trust_proxy_data'] = false;

You must specify the IP addresses or address ranges of trusted proxies using CIDR notation:

$DP_CONFIG['trust_proxy_data'] = array(
    '',         // whitelist this specific IP
    ''        // whitelist this range ( - 255)
    '@/etc/proxy_list.php', // read addresses from file (as PHP array)

If this is not configured correctly, it may appear that all users have the same IP address (the address of the proxy server).

For Deskpro to function properly, the servers it interacts with must be sending proper headers with each request:

  • X-Forwarded-For: The IP address of the user.
  • X-Forwarded-Host: The real hostname the user requested.
  • X-Forwarded-Port: The real port the user requested (usually 80 or 443 for SSL)
  • X-Forwarded-Proto: The protocol (HTTP or HTTPS) of the user request
Authors list

First published: 21/03/2017

Last updated: Oct 30, 2017 by Paul Davies