Skip to content

How-to Guides

Technical References

Retrieve the URL of a file without the CDN URL

Usually having the CDN being returned as the location of files is advantageous because the files are closer to the end user.
However, there are some instances such as CORS and other cross domain reasons that would make you not want the CDN domain.
In those cases, using the function wpcom_vip_noncdn_uri will give you the URL you are looking for.

This is a helper function defined in VIP’s /mu-plugins/.

Last updated: December 23, 2020