Try to properly parse headers when running behind nginx proxy