Forum Discussion
Mohemmad Kalva
Dec 18, 2017Copper Contributor
How to disable public CDN for particular site collection?
I have implemented on master page in which I had referenced the css and js file using relative URLs to the site.
After that, I enabled the public CDN for Office 365 to deploy the SPFx component...
- Dec 19, 2017
You're welcome!
On your Office 365 CDN remove the default origin for masterpage:
Remove-SPOTenantCdnOrigin -CdnType Public -OriginUrl */MASTERPAGE
This will remove the default CDN origin with wildcard, which will be for every site collection in your tenant (remove others to if necessary like */STYLE LIBRARY).
Add a new origin with a OriginUrl pointing to the site collection and master page gallery location Like:
Add-SPOTenantCdnOrigin -CdnType public -OriginUrl sites/yoursitecollection/_catalogs/masterpage
This way you have configured only your site collection masterpage catalog to be a CDN enabled library. You could also point it to a folder in your library to scope it more specific.
Hope this helps!
Mohemmad Kalva
Dec 19, 2017Copper Contributor
Thanks for replying..!!
The site collection where my custom master page has been applied and the site where I am deploying the SPFx web parts are different.
So, I want the solution where I can run the SPFx web part from Office 365 CDN and the custom master page does not affected in another site collection.
Dec 19, 2017
You're welcome!
On your Office 365 CDN remove the default origin for masterpage:
Remove-SPOTenantCdnOrigin -CdnType Public -OriginUrl */MASTERPAGE
This will remove the default CDN origin with wildcard, which will be for every site collection in your tenant (remove others to if necessary like */STYLE LIBRARY).
Add a new origin with a OriginUrl pointing to the site collection and master page gallery location Like:
Add-SPOTenantCdnOrigin -CdnType public -OriginUrl sites/yoursitecollection/_catalogs/masterpage
This way you have configured only your site collection masterpage catalog to be a CDN enabled library. You could also point it to a folder in your library to scope it more specific.
Hope this helps!
- Mary_2020Dec 18, 2019Copper Contributor
Hi Robert Schouten,
We lost SharePoint icon from apps list in Office 365!
Of course we have access to admin center and all websites.
What do you think? How did it happen and how can bring it back to the list?