Do not rewrite when config.before function returns false