Fix configuration middleware behavior when no configuration file is present