merge middleware into sinatra_config