Caching static content for on-premises SharePoint site

We have an on-premises SharePoint application which is not public and requires Active directory authentication, how can we use cloudflare to cache it’s static contents like css, javascript and images that are within this secure SharePoint app?

Also, this on-prem app is accessed by employees across the globe and we would like to put content near the users using cloudflare.

You can’t cache that, since the content isn’t public each request will have user auth details within it, which will make them private.

As far as using Cloudflare simply put an A (or CNAME if it already has a domain) and make sure it supports HTTPS (I presume it does) and the FQDN you are putting it behind. Set your SSL/TLS setting to Full (Strict).

We have a lot of custom javascript files and css, can we push those out to cloudflare CDN and what are some of the ways we can upload these files to cloudflare and reference these cloudflare url in our master page?

1 Like

You can’t push to Cloudflare as they are a Pull CDN. If you can split the private and public files with different Cache-Control headers, even on the same domain, they can be cached at the edge after the first request for as long as the header (adhered to up until they are requested often enough and there is enough space on the POP).

I see thanks. So basically you are saying to pull these custom javascript/css files out to public url so these can be cached by cloudflare? Because right now these files are all private on-prem and requires AD login.

If possible yes. They need to not change upon user request. Alternatively you can set up a Worker with the Cache API, but that is a whole different requirement on Cloudflare side. It may be easier if the backend is complex though.

Okay great.

so as an example, lets say we move these static files to a public url.
https://publicdomain.com/assets/js/file1.js
https://publicdomain.com/assets/css/file1.css

Step 1: Add this public website to cloudflare in the admin panel
Step 2: Replace https://publicdomain.com/assets/js/file1.js URL in my website with cloudflares generated url? how do I get the cloudflare url of the file?

Thanks

Cloudflare is not a standard CDN as you imagine, the whole push idea stems from this as well.

Firstly read this…

You need to enroll your domain to Cloudflare, make the domain active and be proxied by Cloudflare and then use your own domain.

This topic was automatically closed after 30 days. New replies are no longer allowed.