Odoo
Cyllo

DBFilter From Header

This addon lets you pass a dbfilter as a HTTP header. This is interesting for setups where database names can’t be mapped to proxied host names.

This addon lets you pass a dbfilter as a HTTP header.

Key Features

  • HTTP Header-Based Database Filtering
  • Compatibility with Proxies.
  • Compatibility with Standard Odoo dbfilter Configuration.
  • Enhanced Configuration.
DBfilter as a HTTP header

This module allows passing a database filter as an HTTP header. This feature is particularly useful in setups where database names cannot be directly mapped to proxied host names.

Compatibility with Proxies

It provides compatibility with various proxy servers such as nginx, caddy, and Apache. Configuration snippets are provided for each proxy server to ensure seamless integration.

Disabled tab content

Installation

To install the "dbfilter_from_header" module, you simply need to place the module in your addons directory. After adding it, you must configure to load the module as a server-wide module. This configuration can be accomplished by specifying the module name in the 'server_wide_modules' parameter within the Odoo configuration file (odoo.conf). Alternatively, you can utilize the --load command-line parameter when starting the server to specify the module to load. server_wide_modules = base,web,dbfilter_from_header

Please note that the standard Odoo dbfilter configuration is still enforced before considering the regular expression provided in the HTTP header.
  • For nginx, use:

    proxy_set_header X-Odoo-dbfilter [your filter regex];

  • For caddy, use:

    proxy_header X-Odoo-dbfilter [your filter regex]

  • For Apache, use:

    RequestHeader set X-Odoo-dbfilter [your filter regex]

And make sure that proxy mode is enabled in Odoo’s configuration file:

proxy_mode = True