for some reason middleware needs to be in config.ru