Fix parsing of proxy envvars (allow trailing slash)