1

I understand that part of onboarding a CDN is re-writing all links to static content in my site from www.example.com/my_img.jpg to www.somecdn.com/my_img.jpg. I learned that from How do CDNs that don't require url rewriting work? and https://css-tricks.com/adding-a-cdn-to-your-website/

However, I took a look at the imperva onboarding docs and I don't see that its necessary. How could that be? do they do something that other CDNs don't?

ihadanny
  • 167
  • 6

2 Answers2

2

The answer is simple: they proxy the WHOLE site.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • cool, so why won't the others do it? it looks like they are saving a major headache for the developers integrating with them - how come all the others require you to re-write? – ihadanny Apr 17 '20 at 13:01
  • What do I know. We do not try to read other people's mine here. Also it is not a major headache for any borderline competent planned project - it actually saves traffic and the general advice is to have CDN files on a separate domain to reduce traffic. – TomTom Apr 17 '20 at 13:11
1

As @TomTom stated, they proxy the whole site.

Imperva is a reverse proxy and Web Application Firewall with caching. Other CDNs that only cache may require you to rewrite your URLs that you want to cache to point to them and leave the ones you don’t, alone.

Generally, in the second situation, the assets you want to cache would be on a separate hostname to the main site anyway (e.g images.example.com)

Greg W
  • 701
  • 1
  • 5
  • 8