remove path from endpoint