added enable cdn function