Amazon Cloudfront Private Distribution – links to images inside CSS

综合技术 2018-02-17 阅读原文

I created a private distribution in Cloudfront to prevent hotlinking. I managed to create links to my objects with signed URL which is working fine now.

My only concerns, is that images link inside my css stylesheets are not working because they are not signed. So if I have, for instance:

background-image: url('../img/bg.png');

The background image is not going to show up since the stylesheet does not include a signed url, and therefore, Cloudfront refuses to serve the content.

Is there anything I can do to prevent this ?

Let me step back and ask a fundamental question: Are you really
worried about people hotlinking your images? Really?
And if someone does, what is the realistic impact it will have on you? Really?

If you have a legitimate reason for preventing people from hot linking, then I'm not really sure that any
CDN service (in this case, CloudFront) is the right solution for you.

Hey, I'm just being honest…

Hello, buddy!

责编内容by:Hello, buddy!阅读原文】。感谢您的支持!

您可能感兴趣的

Overflow hidden breaking translateZ Setup I have three div s using CSS3 translations in all d...
网页中采用DIV+CSS布局技术的优势和缺点... 采用DIV+CSS好处: 1、div css有利于搜索引擎爬虫:一般而言相同网页页面html文件table布局字节大于div+css布局的字节,所以可...
Amplify – A tiny script allowing inline image zoom... Amplify Overview Amplify allows users to increase the size of images. ...
移动端自适应处理–dpr 可伸缩布局方案 ---这个只是手淘的一个插件 移动端高清多屏适配方案 ---主要参考的是这个 ...
前端不止:Retina屏幕下两倍图 所见不一定即所得 眼睛是心灵的窗户,也是蒙蔽你的一种途径。 假设,我给你一张图片,你觉得肉眼可以观察到全部的细节吗? 屏幕上一张清晰的图片...