Skip to main content

Using the tenantRegex option

In a multi-Tenant setup, Informer identifies the Tenant from the request, so requests are routed and isolated correctly. Two pieces work together: the forwarded request headers and the tenantRegex option.

Request headers

Your reverse proxy or web server must set these headers correctly:

  • X-Forwarded-Proto — forwards the request scheme (HTTP or HTTPS).
  • X-Inf-Tenant — carries the Tenant identifier extracted from the request URI.
  • X-Forwarded-Path — forwards the path so Tenant identifiers appear in response URLs.

Misconfigured headers, especially X-Forwarded-Path, are a common source of problems.

Configuring tenantRegex

Set tenantRegex at the top level of config.json to a regular expression that extracts the Tenant identifier from the hostname. For subdomain-based identification, the recommended pattern captures the subdomain. For example, if your DNS is *.example.com and the manager Tenant is reached at https://manager.example.com, use:

"tenantRegex": "(\\S+)(.example.com)$"

Replace example.com with your registered domain. After changing the configuration, test Tenant access to confirm Tenants are identified correctly and data stays isolated. See Multi-tenancy for the broader setup.