app icon
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


GNU Affero General Public License v3.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you comply with the terms of the GNU Affero General Public License, version 3.0, available at https://www.gnu.org/licenses/agpl-3.0.html. You may develop software that uses the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those software under the terms of the GNU Affero General Public License, version 3.0. It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software without including the complete text of the GNU Affero General Public License, version 3.0, along with any applicable additional permissions. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Free
0
Technical Name dbfilter_from_header
License AGPL-3
Lines of Code 47
  • web
You bought this module and need support? Click Here!