Upgrading the Enforcer

Upgrading from versions lower than 4.x

As of version 4.x the config builder was added. The config builder adds default values to properties that are not implicitly specified. This change requires the user to import the configuration in the init_worker_by_lua_block and access_by_lua_block blocks inside nginx.conf:

  1. Modify init_worker_by_lua_block
    init_worker_by_lua_block {
        local pxconfig = require("px.pxconfig")
        require ("px.utils.pxtimer").application(pxconfig)
  1. Modify access_by_lua_block
    access_by_lua_block {
        local config = require('px.pxconfig')
  1. Modify header_filter_by_lua_block
    header_filter_by_lua_block {

Upgrading from versions above 4.x

To upgrade to the latest Enforcer version, re-install the Enforcer according to your OS.