attachment downloader middleware making use of nginx proxy paths