Add reverse proxy fixing middleware