Added support for returning urls that point to either the origin or the cdn depending on whether the cdn is up to date or not.