common/config: config filter function [GH-521]

Fixes #521