to check the data location, you need to login the admin center of Office 365 with global admin account. and browse to company profile.
Admin center > settings > Company profile > data location > View details.
The article you link to says, "Requests for data in the Office 365 SharePoint CDN must be referred (redirected) from your Office 365 tenant or an authorization token will not be generated." It qualifies that other CDNs may have different standards, but it looks as if the expected default CDN behavior is exactly what you are experiencing.
I have changed my deployment steps:
gulp clean --ship
gulp build --ship
gulp bundle --ship
gulp package-solution --ship
This has resolved the excessive number of js files in the /temp/deploy folder and the size of the sppkg file. I also have not experienced the issues with the CDN while using this approach.
There is not an API to achieve this feature in pnp-powershell currently. Check the article below:
We need use the PowerShell below to achieve it in currently.
$spo = Read-Host 'Enter your SPO Service URL. (example https://<tenant>-admin.sharepoint.com)'
$origin = Read-Host '...
By default, the master pages gallery is added as a CDN endpoint when public CDN is enabled.
You could use the Remove-SPOTenantCdnOrigin PowerShell command to remove the CDN.
But the change will be applied to all site collections. It is a tenant setting.
There is a similar post:
"public" means that technically files are available anonymously through the CDN URLs. There is referrer filtering, which will block Office 365 CDN to be used as the hosting location for assets which are not used in SharePoint.
It's important to notice that you will only expose static assets like JS files or images, not actual content. Only those which are ...